From: Stefano Lattarini Date: Sun, 18 Sep 2011 17:53:11 +0000 (+0200) Subject: py-compile tests: more faithful 'installcheck' support X-Git-Tag: ng-0.5a~89^2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d344ff97931dee43c7a1a7f815142042c9813bf8;p=thirdparty%2Fautomake.git py-compile tests: more faithful 'installcheck' support * tests/py-compile-basedir.test: Use the `$am_scriptsdir' variable instead of `$testsrcdir/../lib', to test more faithfully under "make installcheck". More uses of the `fatal_' subroutine to diagnose hard errors. * tests/py-compile-basic.test: Likewise. * tests/py-compile-basic2.test: Likewise. * tests/py-compile-destdir.test: Likewise. * tests/py-compile-env.test: Likewise. * tests/py-compile-option-terminate.test: Likewise. * tests/py-compile-usage.test: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 028d268a7..96275da9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2011-09-18 Stefano Lattarini + + py-compile tests: more faithful 'installcheck' support + * tests/py-compile-basedir.test: Use the `$am_scriptsdir' variable + instead of `$testsrcdir/../lib', to test more faithfully under + "make installcheck". More uses of the `fatal_' subroutine to + diagnose hard errors. + * tests/py-compile-basic.test: Likewise. + * tests/py-compile-basic2.test: Likewise. + * tests/py-compile-destdir.test: Likewise. + * tests/py-compile-env.test: Likewise. + * tests/py-compile-option-terminate.test: Likewise. + * tests/py-compile-usage.test: Likewise. + 2011-09-18 Stefano Lattarini tests: remove redundant settings of `errexit' shell flag diff --git a/tests/py-compile-basedir.test b/tests/py-compile-basedir.test index d48301b1c..1eee98021 100755 --- a/tests/py-compile-basedir.test +++ b/tests/py-compile-basedir.test @@ -24,7 +24,8 @@ required=python mkdir sandbox cd sandbox -cp "$testsrcdir/../lib/py-compile" . +cp "$am_scriptdir/py-compile" . \ + || fatal_ "failed to fetch auxiliary script py-compile" f=__init__ for d in foo foo/bar "`pwd`/foo" . .. ../foo ''; do diff --git a/tests/py-compile-basic.test b/tests/py-compile-basic.test index 6ea4d907f..f8d083e7d 100755 --- a/tests/py-compile-basic.test +++ b/tests/py-compile-basic.test @@ -21,7 +21,8 @@ required=python . ./defs || Exit 1 -cp "$testsrcdir/../lib/py-compile" . +cp "$am_scriptdir/py-compile" . \ + || fatal_ "failed to fetch auxiliary script py-compile" cat > foo.py <<'END' # Try out some non-trivial syntax in here. diff --git a/tests/py-compile-basic2.test b/tests/py-compile-basic2.test index 0e81e4386..cbb58908b 100755 --- a/tests/py-compile-basic2.test +++ b/tests/py-compile-basic2.test @@ -53,7 +53,8 @@ lst=' mkdir dir cd dir -cp "$testsrcdir/../lib/py-compile" . +cp "$am_scriptdir/py-compile" . \ + || fatal_ "failed to fetch auxiliary script py-compile" mkdir sub sub/subsub touch $pyfiles ./py-compile $pyfiles diff --git a/tests/py-compile-destdir.test b/tests/py-compile-destdir.test index 59b7a7886..1bcd17be5 100755 --- a/tests/py-compile-destdir.test +++ b/tests/py-compile-destdir.test @@ -19,7 +19,8 @@ required=python . ./defs || Exit 1 -cp "$testsrcdir/../lib/py-compile" . +cp "$am_scriptdir/py-compile" . \ + || fatal_ "failed to fetch auxiliary script py-compile" # Should not give false positives when grepping for it, so use # an "uncommon" string (with ugly CamelCase). diff --git a/tests/py-compile-env.test b/tests/py-compile-env.test index 028c7960e..df6b7373a 100755 --- a/tests/py-compile-env.test +++ b/tests/py-compile-env.test @@ -18,7 +18,8 @@ . ./defs || Exit 1 -cp "$testsrcdir/../lib/py-compile" . +cp "$am_scriptdir/py-compile" . \ + || fatal_ "failed to fetch auxiliary script py-compile" cat > my-py <<'END' #!/bin/sh diff --git a/tests/py-compile-option-terminate.test b/tests/py-compile-option-terminate.test index 20baca4e2..74bf63811 100755 --- a/tests/py-compile-option-terminate.test +++ b/tests/py-compile-option-terminate.test @@ -20,7 +20,8 @@ required=python . ./defs || Exit 1 -cp "$testsrcdir/../lib/py-compile" . +cp "$am_scriptdir/py-compile" . \ + || fatal_ "failed to fetch auxiliary script py-compile" : > ./-o.py : > ./--foo.py diff --git a/tests/py-compile-usage.test b/tests/py-compile-usage.test index 0ec242755..0e2088d92 100755 --- a/tests/py-compile-usage.test +++ b/tests/py-compile-usage.test @@ -19,7 +19,8 @@ . ./defs || Exit 1 -cp "$testsrcdir/../lib/py-compile" . +cp "$am_scriptdir/py-compile" . \ + || fatal_ "failed to fetch auxiliary script py-compile" # --help