[rtems commit] libtests/tar0[12]: Add tar archive
Sebastian Huber
sebh at rtems.org
Thu May 7 10:32:10 UTC 2020
Module: rtems
Branch: master
Commit: ef9517b7d5b46da94d541cbc0f5fbc82c53115c5
Changeset: http://git.rtems.org/rtems/commit/?id=ef9517b7d5b46da94d541cbc0f5fbc82c53115c5
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed May 6 07:33:47 2020 +0200
libtests/tar0[12]: Add tar archive
Do not generate the test tar archive on the host computer since not all
file systems support symbolic links.
Close #3968.
---
testsuites/libtests/Makefile.am | 18 ++++++------------
testsuites/libtests/configure.ac | 3 +--
testsuites/libtests/tar01/tar01.tar | Bin 0 -> 10240 bytes
testsuites/libtests/tar02/init.c | 4 ++--
4 files changed, 9 insertions(+), 16 deletions(-)
diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index e493e3d..c312f14 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -1271,15 +1271,12 @@ endif
tar01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_tar01) \
$(support_includes) $(test_includes) -I$(top_srcdir)/include
tar01_LDADD = $(RTEMS_ROOT)cpukit/librtemscpu.a $(RTEMS_ROOT)cpukit/libz.a $(LDADD)
-tar01.tar: $(srcdir)/tar01/home/test_file $(srcdir)/tar01/home/abc/def/test_script $(srcdir)/tar01/symlink
- @rm -f $@
- $(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $+
-tar01-tar.c: tar01.tar
+tar01-tar.c: tar01/tar01.tar
$(AM_V_GEN)$(BIN2C) -C $< $@
-tar01-tar.h: tar01.tar
+tar01-tar.h: tar01/tar01.tar
$(AM_V_GEN)$(BIN2C) -H $< $@
tar01-tar.o: tar01-tar.c tar01-tar.h
-tar01.tar.gz: tar01.tar
+tar01.tar.gz: tar01/tar01.tar
$(AM_V_GEN)$(GZIP) < $< > $@
tar01-tar-gz.c: tar01.tar.gz
$(AM_V_GEN)$(BIN2C) -C $< $@
@@ -1288,7 +1285,7 @@ tar01-tar-gz.h: tar01.tar.gz
CLEANFILES += tar01.tar tar01-tar.c tar01-tar.h \
tar01.tar.gz tar01-tar-gz.c tar01-tar-gz.h
if TARTEST_XZ
-tar01.tar.xz: tar01.tar
+tar01.tar.xz: tar01/tar01.tar
$(AM_V_GEN)$(XZ) < $< > $@
tar01-tar-xz.c: tar01.tar.xz
$(AM_V_GEN)$(BIN2C) -C $< $@
@@ -1310,12 +1307,9 @@ tar02_SOURCES = tar02/init.c ../psxtests/psxfile01/test_cat.c \
tar02-tar.c tar02-tar.h
tar02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_tar02) \
$(support_includes) $(test_includes) -I$(top_srcdir)/include
-tar02.tar: $(srcdir)/tar01/home/test_file $(srcdir)/tar01/home/abc/def/test_script $(srcdir)/tar01/symlink
- @rm -f $@
- $(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $+
-tar02-tar.c: tar02.tar
+tar02-tar.c: tar01/tar01.tar
$(AM_V_GEN)$(BIN2C) -C $< $@
-tar02-tar.h: tar02.tar
+tar02-tar.h: tar01/tar01.tar
$(AM_V_GEN)$(BIN2C) -H $< $@
tar02-tar.o: tar02-tar.c tar02-tar.h
tar02/init.c: tar02-tar.h
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index 710d100..3b54626 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -30,7 +30,6 @@ RTEMS_CHECK_CXX(RTEMS_BSP)
RTEMS_CHECK_CPUOPTS([RTEMS_NETWORKING])
RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
-AC_PROG_LN_S
AC_PATH_PROG([PAX],[pax],no)
AC_PATH_PROG([GZIP],[gzip],no)
AC_PATH_PROG([XZ],[xz],no)
@@ -39,7 +38,7 @@ AS_IF([test "x$PAX" = "xno"],[
AC_MSG_ERROR([pax is missing.])
])
-AM_CONDITIONAL(TARTESTS,test "$as_ln_s" = "ln -s" && test -n "$PAX" && test -n "$GZIP")
+AM_CONDITIONAL(TARTESTS,test -n "$PAX" && test -n "$GZIP")
AM_CONDITIONAL(TARTEST_XZ,test -n "$XZ")
AM_CONDITIONAL(HAS_CXX,test "$rtems_cv_HAS_CPLUSPLUS" = "yes")
diff --git a/testsuites/libtests/tar01/tar01.tar b/testsuites/libtests/tar01/tar01.tar
new file mode 100644
index 0000000..6c6952e
Binary files /dev/null and b/testsuites/libtests/tar01/tar01.tar differ
diff --git a/testsuites/libtests/tar02/init.c b/testsuites/libtests/tar02/init.c
index 7a1395b..8099237 100644
--- a/testsuites/libtests/tar02/init.c
+++ b/testsuites/libtests/tar02/init.c
@@ -32,8 +32,8 @@ const char rtems_test_name[] = "TAR 2";
rtems_task Init(rtems_task_argument argument);
void test_tarfs_load(void);
-#define TARFILE_START tar02_tar
-#define TARFILE_SIZE tar02_tar_size
+#define TARFILE_START tar01_tar
+#define TARFILE_SIZE tar01_tar_size
static const char file[] = "/home/test_file";
More information about the vc
mailing list