[systemd-commits] Makefile.am test/rules-test.sh test/rule-syntax-check.py

Martin Pitt martin at kemper.freedesktop.org
Tue Jan 20 03:51:09 PST 2015


 Makefile.am               |    1 +
 test/rule-syntax-check.py |    1 -
 test/rules-test.sh        |    6 +++---
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 6c8f2e7d78b1fe280588dc91beae90cdf36fcd49
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Tue Jan 20 12:46:28 2015 +0100

    test: Use configured Python
    
    Don't hardcode "python" or /usr/bin/python, but use the configured $(PYTHON).

diff --git a/Makefile.am b/Makefile.am
index 5b789d0..788e634 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -149,6 +149,7 @@ check_DATA =
 tests=
 manual_tests =
 if ENABLE_TESTS
+export PYTHON
 noinst_PROGRAMS = $(manual_tests) $(tests)
 TESTS = $(tests)
 else
diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py
old mode 100755
new mode 100644
index 8da38cd..8c0180b
--- 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 47d42cb..2195753 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'`



More information about the systemd-commits mailing list