summaryrefslogtreecommitdiff
path: root/t/python12.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/python12.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/python12.sh')
-rwxr-xr-xt/python12.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/t/python12.sh b/t/python12.sh
index 3fd40308a..19398337c 100755
--- a/t/python12.sh
+++ b/t/python12.sh
@@ -36,19 +36,19 @@ $ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
-instdir=$(pwd)/inst
+destdir=$(pwd)/inst
mkdir inst build
cd build
../configure --prefix="/usr"
-$MAKE install DESTDIR=$instdir
+$MAKE install DESTDIR=$destdir
# Perfunctory test that the files were created.
-test -f "$instdir/usr/share/my/my.py"
-test -f "$instdir/usr/share/my/my.pyc"
-test -f "$instdir/usr/share/my/my.pyo"
+test -f "$destdir/usr/share/my/my.py"
+pyo=$(pyc_location -p "$destdir/usr/share/my/my.pyo")
+pyc=$(pyc_location -p "$destdir/usr/share/my/my.pyc")
# If DESTDIR has made it into the byte compiled files, fail the test.
-$FGREP "$instdir" "$instdir/usr/share/my/my.pyo" \
- "$instdir/usr/share/my/my.pyc" && exit 1
+st=0; $FGREP "$destdir" "$pyc" "$pyo" || st=$?
+test $st -eq 1
: