[PATCH 2/3] tar01 and tar02: Do not generate tar archives

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Nov 18 07:10:47 UTC 2019


This simplifies the build and avoids some host dependencies, e.g.
availability of symbolic links in the host file system.  Makes it
possible to validate time stamps.

Update #3818.
---
 testsuites/libtests/Makefile.am        |  41 ++++++++-------------------------
 testsuites/libtests/tar01/tar01.tar    | Bin 0 -> 10240 bytes
 testsuites/libtests/tar01/tar01.tar.gz | Bin 0 -> 296 bytes
 testsuites/libtests/tar01/tar01.tar.xz | Bin 0 -> 340 bytes
 testsuites/libtests/tar02/tar02.tar    | Bin 0 -> 10240 bytes
 5 files changed, 9 insertions(+), 32 deletions(-)
 create mode 100644 testsuites/libtests/tar01/tar01.tar
 create mode 100644 testsuites/libtests/tar01/tar01.tar.gz
 create mode 100644 testsuites/libtests/tar01/tar01.tar.xz
 create mode 100644 testsuites/libtests/tar02/tar02.tar

diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am
index b7a102dc7f..d593d93ca3 100644
--- a/testsuites/libtests/Makefile.am
+++ b/testsuites/libtests/Makefile.am
@@ -1302,39 +1302,27 @@ 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: 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)
-tar01_tar.c: tar01.tar
+tar01_tar.c: $(srcdir)/tar01/tar01.tar
 	$(AM_V_GEN)$(BIN2C) -C $< $@
-tar01_tar.h: tar01.tar
+tar01_tar.h: $(srcdir)/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: $(srcdir)/tar01/tar01.tar
 	$(AM_V_GEN)$(GZIP) < $< > $@
 tar01_tar_gz.c: tar01.tar.gz
 	$(AM_V_GEN)$(BIN2C) -C $< $@
 tar01_tar_gz.h: tar01.tar.gz
 	$(AM_V_GEN)$(BIN2C) -H $< $@
-CLEANFILES += tar01.tar tar01_tar.c tar01_tar.h \
-	tar01.tar.gz tar01_tar_gz.c tar01_tar_gz.h
+CLEANFILES += tar01_tar.c tar01_tar.h tar01_tar_gz.c tar01_tar_gz.h
 if TARTEST_XZ
-tar01.tar.xz: tar01.tar
+tar01.tar.xz: $(srcdir)/tar01/tar01.tar
 	$(AM_V_GEN)$(XZ) < $< > $@
 tar01_tar_xz.c: tar01.tar.xz
 	$(AM_V_GEN)$(BIN2C) -C $< $@
 tar01_tar_xz.h: tar01.tar.xz
 	$(AM_V_GEN)$(BIN2C) -H $< $@
 TAR01_XZ_H = tar01_tar_xz.h
-CLEANFILES += tar01.tar.xz tar01_tar_xz.c tar01_tar_xz.h
+CLEANFILES += tar01_tar_xz.c tar01_tar_xz.h
 endif
 tar01/init.c: tar01_tar.h tar01_tar_gz.h $(TAR01_XZ_H)
 endif
@@ -1349,24 +1337,13 @@ 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: 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)
-tar02_tar.c: tar02.tar
+tar02_tar.c: $(srcdir)/tar02/tar02.tar
 	$(AM_V_GEN)$(BIN2C) -C $< $@
-tar02_tar.h: tar02.tar
+tar02_tar.h: $(srcdir)/tar02/tar02.tar
 	$(AM_V_GEN)$(BIN2C) -H $< $@
 tar02-tar.o: tar02-tar.c tar02-tar.h
 tar02/init.c: tar02_tar.h
-CLEANFILES += tar02.tar tar02_tar.c tar02_tar.h
+CLEANFILES += tar02_tar.c tar02_tar.h
 endif
 endif
 
diff --git a/testsuites/libtests/tar01/tar01.tar b/testsuites/libtests/tar01/tar01.tar
new file mode 100644
index 0000000000000000000000000000000000000000..3d66cddfe366d8e8669954d78af08c1c986e10e0
GIT binary patch
literal 10240
zcmeH}!EVDK42FBoQ at GlBD<q+Lf*p71dY{lr8a9$lF`d-6A2f%mS(O{pw*Dv*Ax4h<
znICBS)~pt3n+UB^ib5wVC1NjRS)Tg%9vaC)t&3nRWwgsY7X_)bVU6Ao?Den^f}8oj
z9oP&!GiA(UOfDugGxax_npl5t*uT`)nKY3_H0!b6SL-jOoYub#3x-6Ra4x;xc>TAH
zWeSg`xCp4P$@O|?yFKZSHrvOiXNn7hkL*oL_0YG$klD_9s~rXDkZtweJY<(tG5R9}
z&id!q!G8D at VMqPX?*F;^rvI{%(0__zOnlxg>8&>|b4>S6Gp%;!6Iz}?`o}{)w$66%
zNi#g at zpCPW@9Oy<zEAb9l*}nVZ%*khCpUinCoMdjg8&GC00 at 8p2!H?xfB*=900 at 8p
a2!H?xfB*=900 at 8p2!H?xfB*>mD1k3q%7VB6

literal 0
HcmV?d00001

diff --git a/testsuites/libtests/tar01/tar01.tar.gz b/testsuites/libtests/tar01/tar01.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..847767107eaf79cede078eed39b8e6ff7c55e066
GIT binary patch
literal 296
zcmV+ at 0oVQ?iwFP+(a&7~1MSw$O2jY_2XN1QiV at GcP1|grz at r!4y977gMw3Q5QP{UP
zsV?FNE{a*f{(ltaFojGqnbO`ny*SFNj9Muv2GPng#ZolQ6km|2<+6^+Mx?x`s<I}T
zxvt3r2Q|hLx!?Dm9{G#>ZX>(+n>A+Cr~U`c;kq+c=UF42$MU(~pY~q}@xK2}yf9Se
zDd(-3_kYzJruZmImw<dn)~mG{Hlzl+T%BKBQMwqs<)9sPqjxb;n85_2EXAWE<J3l<
z6 at R@E_>tH7=bO>oha79{{r*?-!~8d`!2BP;$uZq}Z41kEY8BIBtsgPV^TAtZ&2X1>
ujcNYd_B;Q7Qi_VIL;Re~eEtCd00000000000002s|9Aozr#*xKC;$NE$d!oz

literal 0
HcmV?d00001

diff --git a/testsuites/libtests/tar01/tar01.tar.xz b/testsuites/libtests/tar01/tar01.tar.xz
new file mode 100644
index 0000000000000000000000000000000000000000..442065a0754cde1a79271f42d8201a5cf6e935d5
GIT binary patch
literal 340
zcmV-a0jvJ~H+ooF000E$*0e?f03iVu0001VFXf})C;tHwT>vy2$@1s;eAV`-0J_+I
zMbzaIQbjYFrm?Xx9-+y2I)VdwyjP_XahI|E=xrVT#Jsil$QXB#dR`RTa`EiQem~C&
z&{hS{i-42)nQ3~RgPPT%@MCb{o-zw1G>omnru0jcNsOd^5M~QAB&uz_-?FhR#LBl<
zt{~eA;yNAW>Uf8Dsr~PA{HUW*mVNB~w98OLdMj@)&x=*v?d$ND_Ow0eS1dl=5i&F|
zm~N&aCf$yu=RkGOHq`?@xbzp^5${|ecfT_9sxiQidP#<-ks~&}R0zE|%Ix>9F2;CI
zpUqN1zVC_{x};_9WXQE&Na3ko&aJd)_FCW`M3h(MXc+03alyAj7Nj!rk(~q4^@UCV
m0001!Oe_}$&O&Pd0j>goPyhg^Z)O{@#Ao{g000001X)@*lcsh6

literal 0
HcmV?d00001

diff --git a/testsuites/libtests/tar02/tar02.tar b/testsuites/libtests/tar02/tar02.tar
new file mode 100644
index 0000000000000000000000000000000000000000..87435c9621a6a4cd975b8209a4fe48005a159676
GIT binary patch
literal 10240
zcmeI!K~IA)6bJB~`4rE1*0mjlPvFsu?rs`aMzw(9F_V3JTR1F3L%h_e`!^&7N=o~C
zywbXB?0S{9h)_zcDO9r5BGy9Y`B=yEP)Kfcu?dZNS%&*kDJ4j!9oE$Qfd|vCgy4Gl
zZ3nhJFFZ2MW13u?(88m?si}_fA1n_~mGd^u$RbTK#rw<nODX5^&!to((hTRk*9(vT
zwsuV6Fcd!m>MHV`*|~O4rlp7N-TfoQ4}*_9*oLaUYeGZjS~oc3DWnd$#_a8FcCL!6
zKO%6-e}3-W+mK?|G5;6Wf2BX=zZM1ZKSeNReO_PDOJ{xNnQpvcTJP*Ta(RaIk1zSy
zc-Ouro#B}O<G$|O`#-H!N$RvXrQ4ib`2Rm?;L$k*AOHafKmY;|fB*y_009U<00Izz
V00bZa0SG_<0uX=z1R(IE0w1vUg6IGM

literal 0
HcmV?d00001

-- 
2.16.4



More information about the devel mailing list