aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-01-20 12:46:28 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2015-01-20 12:49:08 +0100
commit6c8f2e7d78b1fe280588dc91beae90cdf36fcd49 (patch)
treed2d9f30c090daf38395820163d4133b2c7ba825c /test
parenttest/rule-syntax-check.py: Fix for Python 3 (diff)
downloadsystemd-6c8f2e7d78b1fe280588dc91beae90cdf36fcd49.tar.gz
systemd-6c8f2e7d78b1fe280588dc91beae90cdf36fcd49.tar.bz2
systemd-6c8f2e7d78b1fe280588dc91beae90cdf36fcd49.zip
test: Use configured Python
Don't hardcode "python" or /usr/bin/python, but use the configured $(PYTHON).
Diffstat (limited to 'test')
-rw-r--r--[-rwxr-xr-x]test/rule-syntax-check.py1
-rwxr-xr-xtest/rules-test.sh6
2 files changed, 3 insertions, 4 deletions
diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py
index 8da38cd78..8c0180bd3 100755..100644
--- a/test/rule-syntax-check.py
+++ b/test/rule-syntax-check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Simple udev rules syntax checker
#
# (C) 2010 Canonical Ltd.
diff --git a/test/rules-test.sh b/test/rules-test.sh
index 47d42cb3f..219575360 100755
--- a/test/rules-test.sh
+++ b/test/rules-test.sh
@@ -20,9 +20,9 @@
[ -n "$srcdir" ] || srcdir=`dirname $0`/..
# skip if we don't have python
-type python >/dev/null 2>&1 || {
- echo "$0: No python installed, skipping udev rule syntax check"
+type ${PYTHON:-python} >/dev/null 2>&1 || {
+ echo "$0: No $PYTHON installed, skipping udev rule syntax check"
exit 0
}
-$srcdir/test/rule-syntax-check.py `find $srcdir/rules -name '*.rules'`
+$PYTHON $srcdir/test/rule-syntax-check.py `find $srcdir/rules -name '*.rules'`