summaryrefslogtreecommitdiff
path: root/t/nobase-python.sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-11-21 14:13:02 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-11-21 14:13:02 +0100
commitcb6a19d9d0c46ddf03b2494333bed2c3d7dc1e15 (patch)
tree721527736aebfef6dc894cbf4306a565f04a3626 /t/nobase-python.sh
parentab49d2bc115ba121b00ac06229d4044a004f67e9 (diff)
parent8d1a542296ca5d9137644387ebe1611239e41018 (diff)
downloadautomake-cb6a19d9d0c46ddf03b2494333bed2c3d7dc1e15.tar.gz
Merge branch 'maint'
* maint: tests: fix a spurious failure when $PYTHON is in the environment python tests: support PEP-3147 installation layout python: uninstall cater to PEP-3147 tests: improve a comment tests: honour $PYTHON override tests: typofix in message news: document fix for bug#8847 (PEP-3147, __pycache__) python: improve support for modern python (CPython 3.2 and PyPy) Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/nobase-python.sh')
-rwxr-xr-xt/nobase-python.sh50
1 files changed, 28 insertions, 22 deletions
diff --git a/t/nobase-python.sh b/t/nobase-python.sh
index fe72ad47c..de640f3ee 100755
--- a/t/nobase-python.sh
+++ b/t/nobase-python.sh
@@ -28,21 +28,31 @@ cat > Makefile.am <<'END'
mydir=$(prefix)/my
my_PYTHON = one.py sub/base.py
nobase_my_PYTHON = two.py sub/nobase.py
-
-test-install-data: install-data
- find inst -print; : For debugging.
- test -f inst/my/one.py
- test -f inst/my/one.pyc
- test -f inst/my/two.py
- test -f inst/my/two.pyc
- test -f inst/my/base.py
- test -f inst/my/base.pyc
- test -f inst/my/sub/nobase.py
- test -f inst/my/sub/nobase.pyc
- test ! -f inst/my/nobase.py
- test ! -f inst/my/nobase.pyc
END
+test_install()
+{
+ $MAKE install-data
+ find inst -print # For debugging.
+ py_installed inst/my/one.py
+ py_installed inst/my/one.pyc
+ py_installed inst/my/two.py
+ py_installed inst/my/two.pyc
+ py_installed inst/my/base.py
+ py_installed inst/my/base.pyc
+ py_installed inst/my/sub/nobase.py
+ py_installed inst/my/sub/nobase.pyc
+ py_installed --not inst/my/nobase.py
+ py_installed --not inst/my/nobase.pyc
+}
+
+test_uninstall()
+{
+ $MAKE uninstall
+ test -d inst/my
+ ! find inst/my -type f -print | grep .
+}
+
mkdir sub
for file in one.py sub/base.py two.py sub/nobase.py; do
@@ -56,23 +66,19 @@ $AUTOMAKE --add-missing
./configure --prefix "$(pwd)/inst" --program-prefix=p
$MAKE
-$MAKE test-install-data
-$MAKE uninstall
-
-find inst/my -type f -print | grep . && exit 1
+test_install
+test_uninstall
$MAKE install-strip
+test_uninstall
# Likewise, in a VPATH build.
-$MAKE uninstall
$MAKE distclean
mkdir build
cd build
../configure --prefix "$(pwd)/inst" --program-prefix=p
-$MAKE
-$MAKE test-install-data
-$MAKE uninstall
-find inst/my -type f -print | grep . && exit 1
+test_install
+test_uninstall
: