From d344ff97931dee43c7a1a7f815142042c9813bf8 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 18 Sep 2011 19:53:11 +0200 Subject: [PATCH] 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. --- ChangeLog | 14 ++++++++++++++ tests/py-compile-basedir.test | 3 ++- tests/py-compile-basic.test | 3 ++- tests/py-compile-basic2.test | 3 ++- tests/py-compile-destdir.test | 3 ++- tests/py-compile-env.test | 3 ++- tests/py-compile-option-terminate.test | 3 ++- tests/py-compile-usage.test | 3 ++- 8 files changed, 28 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 028d268..96275da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 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 * tests/aclocal-acdir.test: Do not set the `errexit' shell flag, as it is already set by `tests/defs'. diff --git a/tests/py-compile-basedir.test b/tests/py-compile-basedir.test index d48301b..1eee980 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 6ea4d90..f8d083e 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 0e81e43..cbb5890 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 59b7a78..1bcd17b 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 028c796..df6b737 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 20baca4..74bf638 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 0ec2427..0e2088d 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 -- 2.7.4