diff options
author | Akira TAGOH <akira@tagoh.org> | 2018-03-28 18:53:52 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2018-03-28 18:54:11 +0900 |
commit | 2cf2e79cb66e29b97bd640a565e4817022f6fdb5 (patch) | |
tree | e2ad52a3509ff955adae02a1f7a5ff54abd07b32 /test | |
parent | 58f52853d5689e897525a5926c1a222340d3f404 (diff) |
Fix make check fail when srcdir != builddir.
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 16 | ||||
-rw-r--r-- | test/run-test.sh | 3 |
2 files changed, 9 insertions, 10 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 88b7f27e..e5b8626a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -8,19 +8,19 @@ AM_TESTS_ENVIRONMENT= \ EXEEXT=${EXEEXT}; export EXEEXT; \ $(NULL) -BUILT_SOURCES = out.expected +BUILT_SOURCES = $(builddir)/out.expected SH_LOG_COMPILER = sh TESTS=run-test.sh -TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in +TESTDATA=4x6.pcf 8x16.pcf fonts.conf.in if FREETYPE_PCF_LONG_FAMILY_NAMES -$(srcdir)/out.expected: $(srcdir)/out.expected-long-family-names - cp $(srcdir)/out.expected-long-family-names $(srcdir)/out.expected +$(builddir)/out.expected: $(srcdir)/out.expected-long-family-names Makefile + cp $(srcdir)/out.expected-long-family-names $(builddir)/out.expected else -$(srcdir)/out.expected: $(srcdir)/out.expected-no-long-family-names - cp $(srcdir)/out.expected-no-long-family-names $(srcdir)/out.expected +$(builddir)/out.expected: $(srcdir)/out.expected-no-long-family-names Makefile + cp $(srcdir)/out.expected-no-long-family-names $(builddir)/out.expected endif AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir) @@ -61,8 +61,6 @@ TESTS += test-name-parse EXTRA_DIST=run-test.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names -CLEANFILES=out fonts.conf - -MAINTAINERCLEANFILES=out.expected +CLEANFILES=out fonts.conf out.expected -include $(top_srcdir)/git.mk diff --git a/test/run-test.sh b/test/run-test.sh index 436dee17..5ef47879 100644 --- a/test/run-test.sh +++ b/test/run-test.sh @@ -26,6 +26,7 @@ case "$OSTYPE" in esac TESTDIR=${srcdir-"$MyPWD"} +BUILDTESTDIR=${builddir-"$MyPWD"} FONTDIR="$MyPWD"/fonts CACHEDIR="$MyPWD"/cache.dir @@ -51,7 +52,7 @@ check () { echo "=" >> out $FCLIST - family pixelsize | sort >> out tr -d '\015' <out >out.tmp; mv out.tmp out - if cmp out $TESTDIR/$EXPECTED > /dev/null ; then : ; else + if cmp out $BUILDTESTDIR/$EXPECTED > /dev/null ; then : ; else echo "*** Test failed: $TEST" echo "*** output is in 'out', expected output in '$EXPECTED'" exit 1 |