[rtems commit] libtests/tar0[12]:: Use static archive content

Sebastian Huber sebh at rtems.org
Mon Nov 25 10:45:28 UTC 2019


Module:    rtems
Branch:    master
Commit:    273e8b72c8ff5780939dedce913e58fc01bb78e5
Changeset: http://git.rtems.org/rtems/commit/?id=273e8b72c8ff5780939dedce913e58fc01bb78e5

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Nov 19 16:37:31 2019 +0100

libtests/tar0[12]:: Use static archive content

This simplifies the build process.  Do not generate the archive content
through the build system.  Let the version control system deal with
symbolic links.

Update #3818.

---

 testsuites/libtests/Makefile.am            | 24 ++++--------------------
 testsuites/libtests/tar01/home/test_file   |  2 ++
 testsuites/libtests/tar01/home/test_script |  2 ++
 testsuites/libtests/tar01/symlink          |  1 +
 4 files changed, 9 insertions(+), 20 deletions(-)

diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index a97a833..2b04387 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -1303,16 +1303,8 @@ 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: Makefile
-	$(AM_V_GEN)rm -rf tar01_fs
-	$(AM_V_GEN)$(MKDIR_P) tar01_fs/home
-	$(AM_V_GEN)(echo "This is a test of loading an RTEMS filesystem from an"; \
-	 echo "initial tar image.") > tar01_fs/home/test_file
-	$(AM_V_GEN)(echo "#! joel"; \
-	 echo "ls -las /dev") > tar01_fs/home/test_script
-	$(AM_V_GEN)chmod +x tar01_fs/home/test_script
-	$(AM_V_GEN)(cd tar01_fs; \
-	 $(LN_S) home/test_file symlink; \
-	 $(PAX) -w -f ../tar01.tar home symlink)
+	@rm -f $@
+	$(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $(srcdir)/tar01/home $(srcdir)/tar01/symlink
 tar01_tar.c: tar01.tar
 	$(AM_V_GEN)$(BIN2C) -C $< $@
 tar01_tar.h: tar01.tar
@@ -1350,16 +1342,8 @@ tar02_SOURCES = tar02/init.c ../psxtests/psxfile01/test_cat.c \
 tar02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_tar02) \
 	$(support_includes) $(test_includes) -I$(top_srcdir)/include
 tar02.tar: Makefile
-	$(AM_V_GEN)rm -rf tar02_fs
-	$(AM_V_GEN)$(MKDIR_P) tar02_fs/home
-	$(AM_V_GEN)(echo "This is a test of loading an RTEMS filesystem from an" ; \
-	 echo "initial tar image.") > tar02_fs/home/test_file
-	$(AM_V_GEN)(echo "#! joel" ; \
-	 echo "ls -las /dev") > tar02_fs/home/test_script
-	$(AM_V_GEN)chmod +x tar02_fs/home/test_script
-	$(AM_V_GEN)(cd tar02_fs; \
-	 $(LN_S) home/test_file symlink; \
-	 $(PAX) -w -f ../tar02.tar home symlink)
+	@rm -f $@
+	$(AM_V_GEN)$(PAX) -w -f $@ -s ,$(srcdir)/tar01/,, $(srcdir)/tar01/home $(srcdir)/tar01/symlink
 tar02_tar.c: tar02.tar
 	$(AM_V_GEN)$(BIN2C) -C $< $@
 tar02_tar.h: tar02.tar
diff --git a/testsuites/libtests/tar01/home/test_file b/testsuites/libtests/tar01/home/test_file
new file mode 100644
index 0000000..1a9e0f6
--- /dev/null
+++ b/testsuites/libtests/tar01/home/test_file
@@ -0,0 +1,2 @@
+This is a test of loading an RTEMS filesystem from an
+initial tar image.
diff --git a/testsuites/libtests/tar01/home/test_script b/testsuites/libtests/tar01/home/test_script
new file mode 100755
index 0000000..8849248
--- /dev/null
+++ b/testsuites/libtests/tar01/home/test_script
@@ -0,0 +1,2 @@
+#! joel
+ls -las /dev
diff --git a/testsuites/libtests/tar01/symlink b/testsuites/libtests/tar01/symlink
new file mode 120000
index 0000000..1f10c8d
--- /dev/null
+++ b/testsuites/libtests/tar01/symlink
@@ -0,0 +1 @@
+home/test_file
\ No newline at end of file



More information about the vc mailing list