Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make distcheck is broken #13

Open
garlick opened this issue Jan 7, 2019 · 2 comments
Open

make distcheck is broken #13

garlick opened this issue Jan 7, 2019 · 2 comments

Comments

@garlick
Copy link
Member

garlick commented Jan 7, 2019

$ make distcheck
[snip]
make[2]: Entering directory '/home/garlick/proj/scrub/scrub-2.6.1/_build/sub/test'
Makefile:704: ../../../src/.deps/aes.Po: No such file or directory
Makefile:705: ../../../src/.deps/genrand.Po: No such file or directory
Makefile:706: ../../../src/.deps/getsize.Po: No such file or directory
Makefile:707: ../../../src/.deps/hwrand.Po: No such file or directory
Makefile:708: ../../../src/.deps/progress.Po: No such file or directory
Makefile:709: ../../../src/.deps/sig.Po: No such file or directory
Makefile:710: ../../../src/.deps/util.Po: No such file or directory
make[2]: *** No rule to make target '../../../src/.deps/util.Po'.  Stop.
make[2]: Leaving directory '/home/garlick/proj/scrub/scrub-2.6.1/_build/sub/test'
Makefile:439: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/garlick/proj/scrub/scrub-2.6.1/_build/sub'
Makefile:645: recipe for target 'distcheck' failed
make: *** [distcheck] Error 1
@garlick
Copy link
Member Author

garlick commented Mar 16, 2021

For a start, the tests need to work with a vpath build, e.g. inputs must be referenced to $(srcdir) and executables to $(builddir) like this:

diff --git a/test/Makefile.am b/test/Makefile.am
index e39a9b2..b188323 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -2,6 +2,8 @@ check_PROGRAMS = pad trand tprogress tgetsize tsig tsize pat
 
 TESTS_ENVIRONMENT = env 
 TESTS_ENVIRONMENT += "PATH_SCRUB=$(top_builddir)/src/scrub"
+TESTS_ENVIRONMENT += "TEST_SRCDIR=$(top_srcdir)/test"
+TESTS_ENVIRONMENT += "TEST_BUILDDIR=$(top_builddir)/test"
 TESTS = t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13 t14 t15 t16 \
        t17 t18 t19 t20 t21 t22
 
diff --git a/test/t00 b/test/t00
index a231dea..7a0ee62 100755
--- a/test/t00
+++ b/test/t00
@@ -1,4 +1,4 @@
 #!/bin/sh
 
-./aestest >t00.out
-diff t00.exp t00.out >t00.diff
+${TEST_BUILDDIR}/aestest >t00.out
+diff ${TEST_SRCDIR}/t00.exp t00.out >t00.diff
diff --git a/test/t01 b/test/t01
index 6d79581..dbc9a3f 100755
--- a/test/t01
+++ b/test/t01
@@ -1,9 +1,9 @@
 #!/bin/sh
 TESTFILE=${TMPDIR:-/tmp}/scrub-testfile.$$
 rm -f $TESTFILE
-./pad 5g $TESTFILE || exit 1
-size=`./tsize $TESTFILE` || exit 1
+${TEST_BUILDDIR}/pad 5g $TESTFILE || exit 1
+size=`${TEST_BUILDDIR}/tsize $TESTFILE` || exit 1
 test $size = 5368709120  || exit 1
 $PATH_SCRUB -r -T $TESTFILE 2>&1|sed -e "s!${TESTFILE}!file!" >t01.out || exit 1
 test -f $TESTFILE && exit 1
-diff t01.out t01.exp >t01.diff
+diff t01.out ${TEST_SRCDIR}/t01.exp >t01.diff

@garlick
Copy link
Member Author

garlick commented Jul 21, 2021

This was noted again in #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant