summaryrefslogtreecommitdiffstats
path: root/testsuites/libtests/tar01
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-04-09 13:39:19 +1000
committerChris Johns <chrisj@rtems.org>2018-04-10 08:24:54 +1000
commit5c65b9881bec47e322607a9a63c83d1a229c1710 (patch)
tree18201091467d737156766d37d3608279a756f7b6 /testsuites/libtests/tar01
parenttestsuite/benchmarks: Merged nested Makefile.am files into one Makefile.am (diff)
downloadrtems-5c65b9881bec47e322607a9a63c83d1a229c1710.tar.bz2
testsuite/libtests: Merged nested Makefile.am files into one Makefile.am
This change is part of the testsuite Makefile.am reorganization. Update #3382
Diffstat (limited to 'testsuites/libtests/tar01')
-rw-r--r--testsuites/libtests/tar01/Makefile.am115
-rw-r--r--testsuites/libtests/tar01/init.c18
2 files changed, 9 insertions, 124 deletions
diff --git a/testsuites/libtests/tar01/Makefile.am b/testsuites/libtests/tar01/Makefile.am
deleted file mode 100644
index 0a97f20cfb..0000000000
--- a/testsuites/libtests/tar01/Makefile.am
+++ /dev/null
@@ -1,115 +0,0 @@
-if TARTESTS
-rtems_tests_PROGRAMS = tar01
-tar01_SOURCES =
-tar01_SOURCES += init.c
-tar01_SOURCES += ../../psxtests/psxfile01/test_cat.c
-tar01_SOURCES += initial_filesystem_tar.c
-tar01_SOURCES += initial_filesystem_tar.h
-tar01_SOURCES += initial_filesystem_tar_gz.c
-tar01_SOURCES += initial_filesystem_tar_gz.h
-
-tar01_LDADD = -lrtemscpu -lz
-
-BUILT_SOURCES =
-BUILT_SOURCES += initial_filesystem_tar.c
-BUILT_SOURCES += initial_filesystem_tar.h
-BUILT_SOURCES += initial_filesystem_tar_gz.c
-BUILT_SOURCES += initial_filesystem_tar_gz.h
-
-if TARTEST_XZ
-tar01_SOURCES += initial_filesystem_tar_xz.c
-tar01_SOURCES += initial_filesystem_tar_xz.h
-
-BUILT_SOURCES += initial_filesystem_tar_xz.c
-BUILT_SOURCES += initial_filesystem_tar_xz.h
-endif TARTEST_XZ
-
-dist_rtems_tests_DATA = tar01.scn
-dist_rtems_tests_DATA += tar01.doc
-endif TARTESTS
-
-include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
-include $(top_srcdir)/../automake/compile.am
-include $(top_srcdir)/../automake/leaf.am
-
-if TARTESTS
-AM_CPPFLAGS += -I$(top_srcdir)/include
-AM_CPPFLAGS += -I$(top_srcdir)/../support/include
-AM_CPPFLAGS += -I$(top_srcdir)/../psxtests/include
-
-if TARTEST_XZ
-AM_CFLAGS += -DHAVE_XZ=1
-endif TARTEST_XZ
-
-LINK_OBJS = $(tar01_OBJECTS) $(tar01_LDADD)
-LINK_LIBS = $(tar01_LDLIBS)
-
-tar01$(EXEEXT): $(tar01_OBJECTS) $(tar01_DEPENDENCIES)
- @rm -f tar01$(EXEEXT)
- $(make-exe)
-
-if TARTEST_XZ
-init.$(OBJEXT): initial_filesystem_tar.h \
- initial_filesystem_tar_gz.h \
- initial_filesystem_tar_xz.h \
- initial_filesystem_tar.c \
- initial_filesystem_tar_gz.c \
- initial_filesystem_tar_xz.c
-else
-init.$(OBJEXT): initial_filesystem_tar.h \
- initial_filesystem_tar_gz.h \
- initial_filesystem_tar.c \
- initial_filesystem_tar_gz.c
-endif
-
-initial_filesystem_tar.c: initial_filesystem.tar
- $(BIN2C) -C initial_filesystem.tar initial_filesystem_tar
-CLEANFILES += initial_filesystem_tar.c
-
-initial_filesystem_tar.h: initial_filesystem.tar
- $(BIN2C) -H initial_filesystem.tar initial_filesystem_tar
-CLEANFILES += initial_filesystem_tar.h
-
-initial_filesystem_tar_gz.c: initial_filesystem.tar.gz
- $(BIN2C) -C initial_filesystem.tar.gz initial_filesystem_tar_gz
-CLEANFILES += initial_filesystem_tar_gz.c
-
-initial_filesystem_tar_gz.h: initial_filesystem.tar.gz
- $(BIN2C) -H initial_filesystem.tar.gz initial_filesystem_tar_gz
-CLEANFILES += initial_filesystem_tar_gz.h
-
-initial_filesystem_tar_xz.c: initial_filesystem.tar.xz
- $(BIN2C) -C initial_filesystem.tar.xz initial_filesystem_tar_xz
-CLEANFILES += initial_filesystem_tar_xz.c
-
-initial_filesystem_tar_xz.h: initial_filesystem.tar.xz
- $(BIN2C) -H initial_filesystem.tar.xz initial_filesystem_tar_xz
-CLEANFILES += initial_filesystem_tar_xz.h
-
-initial_filesystem.tar:
- rm -rf initial_fs
- $(MKDIR_P) initial_fs/home
- (echo "This is a test of loading an RTEMS filesystem from an" ; \
- echo "initial tar image.") >initial_fs/home/test_file
- (echo "#! joel" ; \
- echo "ls -las /dev") >initial_fs/home/test_script
- chmod +x initial_fs/home/test_script
- (cd initial_fs; \
- $(LN_S) home/test_file symlink; \
- $(PAX) -w -f ../initial_filesystem.tar home symlink)
-CLEANFILES += initial_filesystem.tar
-
-initial_filesystem.tar.gz: initial_filesystem.tar
- $(GZIP) < initial_filesystem.tar > initial_filesystem.tar.gz
-CLEANFILES += initial_filesystem.tar.gz
-
-initial_filesystem.tar.xz: initial_filesystem.tar
- $(XZ) --lzma2=dict=8192 < initial_filesystem.tar > initial_filesystem.tar.xz
-CLEANFILES += initial_filesystem.tar.xz
-
-endif TARTESTS
-
-clean-local:
- -rm -rf initial_fs
-
-include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/libtests/tar01/init.c b/testsuites/libtests/tar01/init.c
index 73a5474940..39413f071b 100644
--- a/testsuites/libtests/tar01/init.c
+++ b/testsuites/libtests/tar01/init.c
@@ -23,10 +23,10 @@
#include <fcntl.h>
#include <unistd.h>
-#include "initial_filesystem_tar.h"
-#include "initial_filesystem_tar_gz.h"
+#include "tar01_tar.h"
+#include "tar01_tar_gz.h"
#if HAVE_XZ
-#include "initial_filesystem_tar_xz.h"
+#include "tar01_tar_xz.h"
#endif
const char rtems_test_name[] = "TAR 1";
@@ -39,13 +39,13 @@ void test_untar_chunks_from_memory(void);
void test_untar_unzip_tgz(void);
void test_untar_unzip_txz(void);
-#define TARFILE_START initial_filesystem_tar
-#define TARFILE_SIZE initial_filesystem_tar_size
-#define TARFILE_GZ_START initial_filesystem_tar_gz
-#define TARFILE_GZ_SIZE initial_filesystem_tar_gz_size
+#define TARFILE_START tar01_tar
+#define TARFILE_SIZE tar01_tar_size
+#define TARFILE_GZ_START tar01_tar_gz
+#define TARFILE_GZ_SIZE tar01_tar_gz_size
#if HAVE_XZ
-#define TARFILE_XZ_START initial_filesystem_tar_xz
-#define TARFILE_XZ_SIZE initial_filesystem_tar_xz_size
+#define TARFILE_XZ_START tar01_tar_xz
+#define TARFILE_XZ_SIZE tar01_tar_xz_size
#endif
void test_cat(