summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-10-19 11:12:56 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-01-20 11:53:51 +0100
commitc41808cdc3a2c3c8ca5f73707745f48aae49e17e (patch)
treea66e9aa9335d8f08ed3f451c937be1caceeb6d2f /tests
parent54d68799b73e755923def1306b4da607ad45bd60 (diff)
Remove headers from EXTRA_DIST
This commit removes the C header files from the EXTRA_DIST variables and instead assigns them to the SOURCE variable of the respective components they belong to. This takes care of having them distributed in the release tar ball and helps with dependency tracking a little. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/checkfs/Makemodule.am6
-rw-r--r--tests/fs-tests/Makemodule.am30
-rw-r--r--tests/ubi-tests/Makemodule.am15
-rw-r--r--tests/unittests/Makemodule.am7
4 files changed, 30 insertions, 28 deletions
diff --git a/tests/checkfs/Makemodule.am b/tests/checkfs/Makemodule.am
index 6e1314f..64ab869 100644
--- a/tests/checkfs/Makemodule.am
+++ b/tests/checkfs/Makemodule.am
@@ -1,4 +1,5 @@
checkfs_SOURCES = tests/checkfs/checkfs.c tests/checkfs/comm.c
+checkfs_SOURCES += tests/checkfs/common.h
checkfs_CPPFLAGS = $(AM_CPPFLAGS)
makefiles_SOURCES = tests/checkfs/makefiles.c
@@ -7,13 +8,10 @@ makefiles_CPPFLAGS = $(AM_CPPFLAGS)
CHECKFS_BINS = \
makefiles checkfs
-CHECKFS_HEADER = \
- tests/checkfs/common.h
-
CHECKFS_EXTRA = \
tests/checkfs/README
-EXTRA_DIST += $(CHECKFS_EXTRA) $(CHECKFS_HEADER)
+EXTRA_DIST += $(CHECKFS_EXTRA)
if INSTALL_TESTS
pkglibexec_PROGRAMS += $(CHECKFS_BINS)
diff --git a/tests/fs-tests/Makemodule.am b/tests/fs-tests/Makemodule.am
index 2eae860..506dadc 100644
--- a/tests/fs-tests/Makemodule.am
+++ b/tests/fs-tests/Makemodule.am
@@ -3,58 +3,63 @@ integck_LDADD = libubi.a libmissing.a
integck_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
test_1_SOURCES = tests/fs-tests/simple/test_1.c tests/fs-tests/lib/tests.c
+test_1_SOURCES += tests/fs-tests/lib/tests.h
test_1_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
test_2_SOURCES = tests/fs-tests/simple/test_2.c tests/fs-tests/lib/tests.c
+test_2_SOURCES += tests/fs-tests/lib/tests.h
test_2_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
ftrunc_SOURCES = tests/fs-tests/simple/ftrunc.c tests/fs-tests/lib/tests.c
+ftrunc_SOURCES += tests/fs-tests/lib/tests.h
ftrunc_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
perf_SOURCES = tests/fs-tests/simple/perf.c tests/fs-tests/lib/tests.c
+perf_SOURCES += tests/fs-tests/lib/tests.h
perf_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
orph_SOURCES = tests/fs-tests/simple/orph.c tests/fs-tests/lib/tests.c
+orph_SOURCES += tests/fs-tests/lib/tests.h
orph_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
stress_1_SOURCES = tests/fs-tests/stress/atoms/stress_1.c
-stress_1_SOURCES += tests/fs-tests/lib/tests.c
+stress_1_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
stress_1_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
stress_2_SOURCES = tests/fs-tests/stress/atoms/stress_2.c
-stress_2_SOURCES += tests/fs-tests/lib/tests.c
+stress_2_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
stress_2_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
stress_3_SOURCES = tests/fs-tests/stress/atoms/stress_3.c
-stress_3_SOURCES += tests/fs-tests/lib/tests.c
+stress_3_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
stress_3_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
pdfrun_SOURCES = tests/fs-tests/stress/atoms/pdfrun.c
-pdfrun_SOURCES += tests/fs-tests/lib/tests.c
+pdfrun_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
pdfrun_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
rndwrite00_SOURCES = tests/fs-tests/stress/atoms/rndwrite00.c
-rndwrite00_SOURCES += tests/fs-tests/lib/tests.c
+rndwrite00_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
rndwrite00_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
fwrite00_SOURCES = tests/fs-tests/stress/atoms/fwrite00.c
-fwrite00_SOURCES += tests/fs-tests/lib/tests.c
+fwrite00_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
fwrite00_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
rmdir00_SOURCES = tests/fs-tests/stress/atoms/rmdir00.c
-rmdir00_SOURCES += tests/fs-tests/lib/tests.c
+rmdir00_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
rmdir00_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
rndrm00_SOURCES = tests/fs-tests/stress/atoms/rndrm00.c
-rndrm00_SOURCES += tests/fs-tests/lib/tests.c
+rndrm00_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
rndrm00_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
rndrm99_SOURCES = tests/fs-tests/stress/atoms/rndrm99.c
-rndrm99_SOURCES += tests/fs-tests/lib/tests.c
+rndrm99_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
rndrm99_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
gcd_hupper_SOURCES = tests/fs-tests/stress/atoms/gcd_hupper.c
-gcd_hupper_SOURCES += tests/fs-tests/lib/tests.c
+gcd_hupper_SOURCES += tests/fs-tests/lib/tests.c tests/fs-tests/lib/tests.h
gcd_hupper_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/tests/fs-tests/lib
fstest_monitor_SOURCES = tests/fs-tests/utils/fstest_monitor.c
@@ -72,11 +77,6 @@ FSTEST_SH = \
tests/fs-tests/stress/fs_stress00.sh \
tests/fs-tests/stress/fs_stress01.sh
-FSTEST_HEADER = \
- tests/fs-tests/lib/tests.h
-
-EXTRA_DIST += $(FSTEST_HEADER)
-
if INSTALL_TESTS
pkglibexec_SCRIPTS += $(FSTEST_SH)
pkglibexec_PROGRAMS += $(FSTEST_BINS)
diff --git a/tests/ubi-tests/Makemodule.am b/tests/ubi-tests/Makemodule.am
index d1fbab7..fe835ed 100644
--- a/tests/ubi-tests/Makemodule.am
+++ b/tests/ubi-tests/Makemodule.am
@@ -1,12 +1,15 @@
io_basic_SOURCES = tests/ubi-tests/io_basic.c tests/ubi-tests/helpers.c
+io_basic_SOURCES += tests/ubi-tests/helpers.h
io_basic_LDADD = libubi.a
io_basic_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
io_update_SOURCES = tests/ubi-tests/io_update.c tests/ubi-tests/helpers.c
+io_update_SOURCES += tests/ubi-tests/helpers.h
io_update_LDADD = libubi.a
io_update_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
io_paral_SOURCES = tests/ubi-tests/io_paral.c tests/ubi-tests/helpers.c
+io_paral_SOURCES += tests/ubi-tests/helpers.h
io_paral_LDADD = libubi.a $(PTHREAD_LIBS)
io_paral_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
@@ -14,26 +17,32 @@ io_paral_LDADD += $(PTHREAD_CFLAGS)
io_paral_CPPFLAGS += $(PTHREAD_CFLAGS)
io_read_SOURCES = tests/ubi-tests/io_read.c tests/ubi-tests/helpers.c
+io_read_SOURCES += tests/ubi-tests/helpers.h
io_read_LDADD = libubi.a
io_read_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
volrefcnt_SOURCES = tests/ubi-tests/volrefcnt.c tests/ubi-tests/helpers.c
+volrefcnt_SOURCES += tests/ubi-tests/helpers.h
volrefcnt_LDADD = libubi.a
volrefcnt_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
integ_SOURCES = tests/ubi-tests/integ.c tests/ubi-tests/helpers.c
+integ_SOURCES += tests/ubi-tests/helpers.h
integ_LDADD = libubi.a
integ_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
mkvol_basic_SOURCES = tests/ubi-tests/mkvol_basic.c tests/ubi-tests/helpers.c
+mkvol_basic_SOURCES += tests/ubi-tests/helpers.h
mkvol_basic_LDADD = libubi.a
mkvol_basic_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
mkvol_bad_SOURCES = tests/ubi-tests/mkvol_bad.c tests/ubi-tests/helpers.c
+mkvol_bad_SOURCES += tests/ubi-tests/helpers.h
mkvol_bad_LDADD = libubi.a
mkvol_bad_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
mkvol_paral_SOURCES = tests/ubi-tests/mkvol_paral.c tests/ubi-tests/helpers.c
+mkvol_paral_SOURCES += tests/ubi-tests/helpers.h
mkvol_paral_LDADD = libubi.a $(PTHREAD_LIBS)
mkvol_paral_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
@@ -41,6 +50,7 @@ mkvol_paral_LDADD += $(PTHREAD_CFLAGS)
mkvol_paral_CPPFLAGS += $(PTHREAD_CFLAGS)
rsvol_SOURCES = tests/ubi-tests/rsvol.c tests/ubi-tests/helpers.c
+rsvol_SOURCES += tests/ubi-tests/helpers.h
rsvol_LDADD = libubi.a
rsvol_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
@@ -51,11 +61,6 @@ UBITEST_BINS = \
UBITEST_SH = \
tests/ubi-tests/runubitests.sh tests/ubi-tests/ubi-stress-test.sh
-UBITEST_HEADER = \
- tests/ubi-tests/helpers.h
-
-EXTRA_DIST += $(UBITEST_HEADER)
-
if INSTALL_TESTS
pkglibexec_SCRIPTS += $(UBITEST_SH)
pkglibexec_PROGRAMS += $(UBITEST_BINS)
diff --git a/tests/unittests/Makemodule.am b/tests/unittests/Makemodule.am
index df1041d..cadd1bc 100644
--- a/tests/unittests/Makemodule.am
+++ b/tests/unittests/Makemodule.am
@@ -1,9 +1,11 @@
ubilib_test_SOURCES = tests/unittests/libubi_test.c lib/libubi.c
+ubilib_test_SOURCES += tests/unittests/test_lib.h
ubilib_test_LDADD = $(CMOCKA_LIBS)
ubilib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek
ubilib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
mtdlib_test_SOURCES = tests/unittests/libmtd_test.c lib/libmtd.c lib/libmtd_legacy.c
+mtdlib_test_SOURCES += tests/unittests/test_lib.h
mtdlib_test_LDADD = $(CMOCKA_LIBS)
mtdlib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek -Wl,--wrap=write
mtdlib_test_CPPFLAGS = -O0 -D_GNU_SOURCE --std=gnu99 $(CMOCKA_CFLAGS) -I$(top_srcdir)/lib/ -I$(top_srcdir)/include -DSYSFS_ROOT='"$(top_srcdir)/tests/unittests/sysfs_mock"'
@@ -12,13 +14,10 @@ TEST_BINS = \
ubilib_test \
mtdlib_test
-UNITTEST_HEADER = \
- tests/unittests/test_lib.h
-
UNITTEST_EXTRA = \
tests/unittests/sysfs_mock
-EXTRA_DIST += $(UNITTEST_HEADER) $(UNITTEST_EXTRA)
+EXTRA_DIST += $(UNITTEST_EXTRA)
TESTS += $(TEST_BINS)
check_PROGRAMS += $(TEST_BINS)