[PATCH 4/7] erofs-utils: tests: fix distcheck
Hu Weiwen
sehuww at mail.scut.edu.cn
Fri Jan 22 03:37:12 AEDT 2021
To get required files to final .tar.gz distribution:
* Any header files should goes into _SOURCES.
* check scripts should goes into dist_check_SCRIPTS.
* 001.out will trigger a GNU make implicit rule, rename it to 001-out
Signed-off-by: Hu Weiwen <sehuww at mail.scut.edu.cn>
---
lib/Makefile.am | 19 ++++++++++++++++++-
tests/Makefile.am | 22 ++++++++++++++++++++++
tests/common/rc | 2 +-
tests/erofs/{001.out => 001-out} | 0
tests/erofs/{002.out => 002-out} | 0
tests/erofs/{003.out => 003-out} | 0
tests/erofs/{004.out => 004-out} | 0
tests/erofs/{005.out => 005-out} | 0
tests/erofs/{006.out => 006-out} | 0
tests/erofs/007 | 2 +-
tests/erofs/{007.out => 007-out} | 0
tests/erofs/{008.out => 008-out} | 0
tests/erofs/{009.out => 009-out} | 0
tests/erofs/{010.out => 010-out} | 0
tests/erofs/{011.out => 011-out} | 0
tests/erofs/{012.out => 012-out} | 0
tests/erofs/{013.out => 013-out} | 0
tests/erofs/{014.out => 014-out} | 0
tests/src/Makefile.am | 6 +++---
19 files changed, 45 insertions(+), 6 deletions(-)
rename tests/erofs/{001.out => 001-out} (100%)
rename tests/erofs/{002.out => 002-out} (100%)
rename tests/erofs/{003.out => 003-out} (100%)
rename tests/erofs/{004.out => 004-out} (100%)
rename tests/erofs/{005.out => 005-out} (100%)
rename tests/erofs/{006.out => 006-out} (100%)
rename tests/erofs/{007.out => 007-out} (100%)
rename tests/erofs/{008.out => 008-out} (100%)
rename tests/erofs/{009.out => 009-out} (100%)
rename tests/erofs/{010.out => 010-out} (100%)
rename tests/erofs/{011.out => 011-out} (100%)
rename tests/erofs/{012.out => 012-out} (100%)
rename tests/erofs/{013.out => 013-out} (100%)
rename tests/erofs/{014.out => 014-out} (100%)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index f21dc35..72c32da 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -3,7 +3,24 @@
noinst_LTLIBRARIES = liberofs.la
liberofs_la_SOURCES = config.c io.c cache.c super.c inode.c xattr.c exclude.c \
- namei.c data.c compress.c compressor.c zmap.c decompress.c
+ namei.c data.c compress.c compressor.c zmap.c decompress.c \
+ compressor.h \
+ $(top_srcdir)/include/erofs_fs.h \
+ $(top_srcdir)/include/erofs/cache.h \
+ $(top_srcdir)/include/erofs/compress.h \
+ $(top_srcdir)/include/erofs/config.h \
+ $(top_srcdir)/include/erofs/decompress.h \
+ $(top_srcdir)/include/erofs/defs.h \
+ $(top_srcdir)/include/erofs/err.h \
+ $(top_srcdir)/include/erofs/exclude.h \
+ $(top_srcdir)/include/erofs/hashtable.h \
+ $(top_srcdir)/include/erofs/inode.h \
+ $(top_srcdir)/include/erofs/internal.h \
+ $(top_srcdir)/include/erofs/io.h \
+ $(top_srcdir)/include/erofs/list.h \
+ $(top_srcdir)/include/erofs/print.h \
+ $(top_srcdir)/include/erofs/trace.h \
+ $(top_srcdir)/include/erofs/xattr.h
liberofs_la_CFLAGS = -Wall -Werror -I$(top_srcdir)/include
if ENABLE_LZ4
liberofs_la_CFLAGS += ${LZ4_CFLAGS}
diff --git a/tests/Makefile.am b/tests/Makefile.am
index efc38fd..3702f91 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,6 +5,7 @@ AUTOMAKE_OPTIONS = serial-tests
SUBDIRS = src
TESTS =
+TESTS_OUT =
TESTS_ENVIRONMENT = \
if [ -z $$SCRATCH_MNT ]; then \
@@ -27,43 +28,64 @@ endif
# 001 - test if unknown algorithm is specificed
TESTS += erofs/001
+TESTS_OUT += erofs/001-out
# 002 - mkfs & test short symlink (fast symlink)
TESTS += erofs/002
+TESTS_OUT += erofs/002-out
# 003 - mkfs & test long symlink (non-fast symlink)
TESTS += erofs/003
+TESTS_OUT += erofs/003-out
# 004 - mkfs & test character/block device
TESTS += erofs/004
+TESTS_OUT += erofs/004-out
# 005 - mkfs & test pipe
TESTS += erofs/005
+TESTS_OUT += erofs/005-out
# 006 - verify the uncompressed image
TESTS += erofs/006
+TESTS_OUT += erofs/006-out
# 007 - check for bad lz4 versions
TESTS += erofs/007
+TESTS_OUT += erofs/007-out
# 008 - verify lz4 compressed image
TESTS += erofs/008
+TESTS_OUT += erofs/008-out
# 009 - verify lz4hc compressed image
TESTS += erofs/009
+TESTS_OUT += erofs/009-out
# 010 - (legacy image) verify lz4 compressed image
TESTS += erofs/010
+TESTS_OUT += erofs/010-out
# 011 - (legacy image) verify lz4hc compressed image
TESTS += erofs/011
+TESTS_OUT += erofs/011-out
# 012 - check the hard-link functionality
TESTS += erofs/012
+TESTS_OUT += erofs/012-out
# 013 - check if hardlinked directories are allowed
TESTS += erofs/013
+TESTS_OUT += erofs/013-out
# 014 - check if cross-device submounts are handled properly
TESTS += erofs/014
+TESTS_OUT += erofs/014-out
+dist_check_SCRIPTS = common/rc $(TESTS)
+dist_check_DATA = $(TESTS_OUT)
+
+clean-local: clean-local-check
+.PHONY: clean-local-check
+clean-local-check:
+ -rm -rf results
diff --git a/tests/common/rc b/tests/common/rc
index a6b6014..edce3ff 100644
--- a/tests/common/rc
+++ b/tests/common/rc
@@ -199,7 +199,7 @@ _check_results()
[ -z $srcdir ] && return 0
[ -f $seqres.notrun ] && return 0
- if ! diff `dirname $0`/$seq.out $tmp.out >/dev/null 2>&1 ; then
+ if ! diff `dirname $0`/$seq-out $tmp.out >/dev/null 2>&1 ; then
mv $tmp.out $seqres.out.bad
return 1
fi
diff --git a/tests/erofs/001.out b/tests/erofs/001-out
similarity index 100%
rename from tests/erofs/001.out
rename to tests/erofs/001-out
diff --git a/tests/erofs/002.out b/tests/erofs/002-out
similarity index 100%
rename from tests/erofs/002.out
rename to tests/erofs/002-out
diff --git a/tests/erofs/003.out b/tests/erofs/003-out
similarity index 100%
rename from tests/erofs/003.out
rename to tests/erofs/003-out
diff --git a/tests/erofs/004.out b/tests/erofs/004-out
similarity index 100%
rename from tests/erofs/004.out
rename to tests/erofs/004-out
diff --git a/tests/erofs/005.out b/tests/erofs/005-out
similarity index 100%
rename from tests/erofs/005.out
rename to tests/erofs/005-out
diff --git a/tests/erofs/006.out b/tests/erofs/006-out
similarity index 100%
rename from tests/erofs/006.out
rename to tests/erofs/006-out
diff --git a/tests/erofs/007 b/tests/erofs/007
index 80628cb..1e9a780 100755
--- a/tests/erofs/007
+++ b/tests/erofs/007
@@ -21,7 +21,7 @@ echo "QA output created by $seq"
[ -z "$lz4_on" ] && \
_notrun "lz4 compression is disabled, skipped."
-$here/src/badlz4 >> $seqres.full 2>&1 || _fail "--> lz4 test FAILED"
+./src/badlz4 >> $seqres.full 2>&1 || _fail "--> lz4 test FAILED"
echo Silence is golden
status=0
diff --git a/tests/erofs/007.out b/tests/erofs/007-out
similarity index 100%
rename from tests/erofs/007.out
rename to tests/erofs/007-out
diff --git a/tests/erofs/008.out b/tests/erofs/008-out
similarity index 100%
rename from tests/erofs/008.out
rename to tests/erofs/008-out
diff --git a/tests/erofs/009.out b/tests/erofs/009-out
similarity index 100%
rename from tests/erofs/009.out
rename to tests/erofs/009-out
diff --git a/tests/erofs/010.out b/tests/erofs/010-out
similarity index 100%
rename from tests/erofs/010.out
rename to tests/erofs/010-out
diff --git a/tests/erofs/011.out b/tests/erofs/011-out
similarity index 100%
rename from tests/erofs/011.out
rename to tests/erofs/011-out
diff --git a/tests/erofs/012.out b/tests/erofs/012-out
similarity index 100%
rename from tests/erofs/012.out
rename to tests/erofs/012-out
diff --git a/tests/erofs/013.out b/tests/erofs/013-out
similarity index 100%
rename from tests/erofs/013.out
rename to tests/erofs/013-out
diff --git a/tests/erofs/014.out b/tests/erofs/014-out
similarity index 100%
rename from tests/erofs/014.out
rename to tests/erofs/014-out
diff --git a/tests/src/Makefile.am b/tests/src/Makefile.am
index ad272d6..537d6b7 100644
--- a/tests/src/Makefile.am
+++ b/tests/src/Makefile.am
@@ -2,12 +2,12 @@
# Makefile.am
AUTOMAKE_OPTIONS = foreign
-noinst_PROGRAMS = fssum
+check_PROGRAMS = fssum
-fssum_SOURCES = md5.c fssum.c
+fssum_SOURCES = md5.c md5.h fssum.c
if ENABLE_LZ4
-noinst_PROGRAMS += badlz4
+check_PROGRAMS += badlz4
badlz4_SOURCES = badlz4.c
badlz4_LDADD = ${liblz4_LIBS}
endif
--
2.30.0
More information about the Linux-erofs
mailing list