yaffs got the make files to work for timothy_tests/quick_tests
authorTimothy Manning <tfhmanning@gmail.com>
Tue, 13 Nov 2012 20:30:25 +0000 (09:30 +1300)
committerTimothy Manning <tfhmanning@gmail.com>
Thu, 15 Nov 2012 00:03:58 +0000 (13:03 +1300)
Signed-off-by: Timothy Manning <tfhmanning@gmail.com>
direct/test-framework/FrameworkRules.mk
direct/test-framework/timothy_tests/quick_tests/Makefile

index 52cd4da4ca04c506f31d950c0db9a81a125d212b..52aaf3c26036387fa0aeaade04e2c25976f419f0 100644 (file)
@@ -29,7 +29,7 @@ CFLAGS +=    -Wextra -Wpointer-arith
 #CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
 
 
 #CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline
 
 
-COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
+COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o yaffs_error.o\
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
                 yaffs_tagscompat.o yaffs_tagsmarshall.o \
                 yaffs_ecc.o yaffs_fileem.o yaffs_fileem2k.o yaffsfs.o yaffs_guts.o \
                 yaffs_packedtags1.o yaffs_ramdisk.o yaffs_ramem2k.o \
                 yaffs_tagscompat.o yaffs_tagsmarshall.o \
@@ -56,6 +56,7 @@ YAFFSDIRECTSYMLINKS =  \
           yaffs_attribs.c \
           yaffs_nandif.c yaffs_nandif.h yportenv.h \
           yaffs_hweight.c yaffs_hweight.h \
           yaffs_attribs.c \
           yaffs_nandif.c yaffs_nandif.h yportenv.h \
           yaffs_hweight.c yaffs_hweight.h \
+         yaffs_error.c \
           yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h \
           yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_tagsmarshall.c yaffs_tagsmarshall.h \
           yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h \
           yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_tagsmarshall.c yaffs_tagsmarshall.h \
@@ -83,7 +84,7 @@ FRAMEWORKEXTRASYMLINKS = \
 FRAMEWORK_SOURCES = $(YAFFSDIRECTSYMLINKS) $(FRAMEWORKEXTRASYMLINKS)
 
 clean:
 FRAMEWORK_SOURCES = $(YAFFSDIRECTSYMLINKS) $(FRAMEWORKEXTRASYMLINKS)
 
 clean:
-       rm -f $(TARGETS) $(ALLOBJS) core $(FRAMEWORK_SOURCES)
+       rm -f $(TARGETS) $(ALLOBJS) core $(FRAMEWORK_SOURCES) yaffs_test
 
 $(YAFFSDIRECTSYMLINKS):
        ln -s $(YDI_DIR)/$@ $@
 
 $(YAFFSDIRECTSYMLINKS):
        ln -s $(YDI_DIR)/$@ $@
index 496e2bea019a9769f9b2dbe7c517a4c52c0ed9d7..27dfdc0c1f8586ebf4c2a1b3d019ae1763ed6588 100644 (file)
@@ -18,7 +18,7 @@
 YDI_DIR = ../../../
 YDI_FRAMEWORK_DIR = ../../
 
 YDI_DIR = ../../../
 YDI_FRAMEWORK_DIR = ../../
 
-TARGETS = yaffs_test fuzzer
+
 TESTFILES =    quick_tests.o lib.o \
                test_yaffs_mount.o test_yaffs_mount_ENODEV.o test_yaffs_mount_ENAMETOOLONG.o test_yaffs_mount_EBUSY.o \
                test_yaffs_mount_NULL.o \
 TESTFILES =    quick_tests.o lib.o \
                test_yaffs_mount.o test_yaffs_mount_ENODEV.o test_yaffs_mount_ENAMETOOLONG.o test_yaffs_mount_EBUSY.o \
                test_yaffs_mount_NULL.o \
@@ -34,7 +34,7 @@ TESTFILES =   quick_tests.o lib.o \
                test_yaffs_truncate.o test_yaffs_truncate_ENOTDIR.o test_yaffs_truncate_EISDIR.o test_yaffs_truncate_ENOENT.o \
                test_yaffs_truncate_EINVAL.o test_yaffs_truncate_big_file.o test_yaffs_truncate_ENOENT2.o test_yaffs_truncate_ELOOP.o \
                test_yaffs_truncate_ELOOP_dir.o test_yaffs_truncate_EROFS.o test_yaffs_truncate_ENAMETOOLONG.o \
                test_yaffs_truncate.o test_yaffs_truncate_ENOTDIR.o test_yaffs_truncate_EISDIR.o test_yaffs_truncate_ENOENT.o \
                test_yaffs_truncate_EINVAL.o test_yaffs_truncate_big_file.o test_yaffs_truncate_ENOENT2.o test_yaffs_truncate_ELOOP.o \
                test_yaffs_truncate_ELOOP_dir.o test_yaffs_truncate_EROFS.o test_yaffs_truncate_ENAMETOOLONG.o \
-               test_yaffs_truncate_NULL.o\
+               test_yaffs_truncate_NULL.o \
                test_yaffs_write.o test_yaffs_write_EBADF.o test_yaffs_write_big_file.o test_yaffs_write_EROFS.o \
                test_yaffs_read.o test_yaffs_read_EBADF.o test_yaffs_read_EINVAL.o\
                test_yaffs_lseek.o test_yaffs_lseek_EBADF.o test_yaffs_lseek_EINVAL.o test_yaffs_lseek_big_file.o \
                test_yaffs_write.o test_yaffs_write_EBADF.o test_yaffs_write_big_file.o test_yaffs_write_EROFS.o \
                test_yaffs_read.o test_yaffs_read_EBADF.o test_yaffs_read_EINVAL.o\
                test_yaffs_lseek.o test_yaffs_lseek_EBADF.o test_yaffs_lseek_EINVAL.o test_yaffs_lseek_big_file.o \
@@ -48,12 +48,12 @@ TESTFILES =         quick_tests.o lib.o \
                test_yaffs_chmod.o test_yaffs_chmod_ENOENT.o test_yaffs_chmod_ENOTDIR.o test_yaffs_chmod_EINVAL.o \
                test_yaffs_chmod_ENOENT2.o test_yaffs_chmod_ELOOP_dir.o test_yaffs_chmod_ELOOP.o test_yaffs_chmod_EROFS.o \
                test_yaffs_chmod_ENAMETOOLONG.o test_yaffs_chmod_NULL.o \
                test_yaffs_chmod.o test_yaffs_chmod_ENOENT.o test_yaffs_chmod_ENOTDIR.o test_yaffs_chmod_EINVAL.o \
                test_yaffs_chmod_ENOENT2.o test_yaffs_chmod_ELOOP_dir.o test_yaffs_chmod_ELOOP.o test_yaffs_chmod_EROFS.o \
                test_yaffs_chmod_ENAMETOOLONG.o test_yaffs_chmod_NULL.o \
-               test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o test_yaffs_fchmod_EROFS.o test_yaffs_fchmod_EINVAL.o\
+               test_yaffs_fchmod_EROFS.o test_yaffs_fchmod_EINVAL.o\
                test_yaffs_fsync.o test_yaffs_fsync_EBADF.o test_yaffs_fsync_EROFS.o \
                test_yaffs_fdatasync.o test_yaffs_fdatasync_EBADF.o test_yaffs_fdatasync_EROFS.o test_yaffs_fdatasync_NULL.o \
                test_yaffs_mkdir.o test_yaffs_mkdir_EEXIST.o test_yaffs_mkdir_ENOTDIR.o test_yaffs_mkdir_ENOENT.o \
                test_yaffs_mkdir_ELOOP_dir.o test_yaffs_mkdir_EROFS.o test_yaffs_mkdir_ENAMETOOLONG.o test_yaffs_mkdir_NULL.o \
                test_yaffs_fsync.o test_yaffs_fsync_EBADF.o test_yaffs_fsync_EROFS.o \
                test_yaffs_fdatasync.o test_yaffs_fdatasync_EBADF.o test_yaffs_fdatasync_EROFS.o test_yaffs_fdatasync_NULL.o \
                test_yaffs_mkdir.o test_yaffs_mkdir_EEXIST.o test_yaffs_mkdir_ENOTDIR.o test_yaffs_mkdir_ENOENT.o \
                test_yaffs_mkdir_ELOOP_dir.o test_yaffs_mkdir_EROFS.o test_yaffs_mkdir_ENAMETOOLONG.o test_yaffs_mkdir_NULL.o \
-               test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o test_yaffs_fchmod_EINVAL.o test_yaffs_fchmod_NULL.o \
+               test_yaffs_fchmod.o test_yaffs_fchmod_EBADF.o  test_yaffs_fchmod_NULL.o \
                test_yaffs_symlink.o test_yaffs_symlink_ENOTDIR.o test_yaffs_symlink_EEXIST.o test_yaffs_symlink_ENOENT.o \
                test_yaffs_symlink_ENOENT2.o test_yaffs_symlink_ELOOP_dir.o test_yaffs_symlink_EROFS.o test_yaffs_symlink_ENAMETOOLONG.o\
                test_yaffs_symlink_NULL.o test_yaffs_symlink_NULL2.o \
                test_yaffs_symlink.o test_yaffs_symlink_ENOTDIR.o test_yaffs_symlink_EEXIST.o test_yaffs_symlink_ENOENT.o \
                test_yaffs_symlink_ENOENT2.o test_yaffs_symlink_ELOOP_dir.o test_yaffs_symlink_EROFS.o test_yaffs_symlink_ENAMETOOLONG.o\
                test_yaffs_symlink_NULL.o test_yaffs_symlink_NULL2.o \
@@ -68,7 +68,7 @@ TESTFILES =   quick_tests.o lib.o \
                test_yaffs_totalspace.o test_yaffs_totalspace_EINVAL.o test_yaffs_totalspace_ENAMETOOLONG.o test_yaffs_totalspace_NULL.o\
                test_yaffs_inodecount.o test_yaffs_inodecount_EINVAL.o test_yaffs_inodecount_ENAMETOOLONG.o test_yaffs_inodecount_NULL.o\
                test_yaffs_link.o test_yaffs_link_ENOENT.o test_yaffs_link_EEXIST.o test_yaffs_link_ENOTDIR.o \
                test_yaffs_totalspace.o test_yaffs_totalspace_EINVAL.o test_yaffs_totalspace_ENAMETOOLONG.o test_yaffs_totalspace_NULL.o\
                test_yaffs_inodecount.o test_yaffs_inodecount_EINVAL.o test_yaffs_inodecount_ENAMETOOLONG.o test_yaffs_inodecount_NULL.o\
                test_yaffs_link.o test_yaffs_link_ENOENT.o test_yaffs_link_EEXIST.o test_yaffs_link_ENOTDIR.o \
-               test_yaffs_link_ENOTDIR2.o test_yaffs_link_ENOENT2.o test_yaffs_link_ENOENT3.o test_yaffs_link_ENOENT3.o \
+               test_yaffs_link_ENOTDIR2.o test_yaffs_link_ENOENT2.o test_yaffs_link_ENOENT3.o  \
                test_yaffs_link_ENOENT4.o test_yaffs_link_ELOOP_dir.o test_yaffs_link_EROFS.o test_yaffs_link_ENAMETOOLONG.o \
                test_yaffs_link_ENAMETOOLONG2.o test_yaffs_link_NULL.o test_yaffs_link_NULL2.o \
                test_yaffs_rmdir.o test_yaffs_rmdir_EBUSY.o test_yaffs_rmdir_EINVAL.o test_yaffs_rmdir_ENOENT.o \
                test_yaffs_link_ENOENT4.o test_yaffs_link_ELOOP_dir.o test_yaffs_link_EROFS.o test_yaffs_link_ENAMETOOLONG.o \
                test_yaffs_link_ENAMETOOLONG2.o test_yaffs_link_NULL.o test_yaffs_link_NULL2.o \
                test_yaffs_rmdir.o test_yaffs_rmdir_EBUSY.o test_yaffs_rmdir_EINVAL.o test_yaffs_rmdir_ENOENT.o \
@@ -84,7 +84,7 @@ TESTFILES =   quick_tests.o lib.o \
                test_yaffs_dup.o test_yaffs_dup_EBADF.o 
 
 
                test_yaffs_dup.o test_yaffs_dup_EBADF.o 
 
 
-all: $(TARGETS)
+all: quick_tests
 
 YAFFS_TEST_OBJS = $(COMMONTESTOBJS) $(TESTFILES)
 FUZZER_OBJS = fuzzer.o
 
 YAFFS_TEST_OBJS = $(COMMONTESTOBJS) $(TESTFILES)
 FUZZER_OBJS = fuzzer.o
@@ -95,11 +95,10 @@ include $(YDI_FRAMEWORK_DIR)/FrameworkRules.mk
 
 
 yaffs_test: $(FRAMEWORK_SOURCES) $(YAFFS_TEST_OBJS)
 
 
 yaffs_test: $(FRAMEWORK_SOURCES) $(YAFFS_TEST_OBJS)
-       gcc $(CFLLAG) -o $@ $(YAFFS_TEST_OBJS)
-
+       gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS)
 
 
 
 
 
 
-quick_tests: $(TESTFILES)
-       gcc $(CFLAG) -o $@ $(TESTFILES)
+quick_tests: $(FRAMEWORK_SOURCES) $(YAFFS_TEST_OBJS)
+       gcc $(CFLAGS) -o $@ $(YAFFS_TEST_OBJS)