test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / t / python.sh
old mode 100755 (executable)
new mode 100644 (file)
index de8c0bb..377a909
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
 
 # Test to make sure py_compile and am__py_compile are correctly defined.
 
-. ./defs || Exit 1
+. test-init.sh
 
 echo 'AM_PATH_PYTHON' >> configure.ac
 
@@ -53,8 +53,8 @@ $AUTOMAKE Makefile3
 grep "py" Makefile.in Makefile2.in Makefile3.in # For debugging.
 
 for f in Makefile.in Makefile2.in Makefile3.in; do
-  test `grep -c '^py_compile =' $f` -eq 1
-  test `grep -c '^am__py_compile =' $f` -eq 1
+  test $(grep -c '^py_compile =' $f) -eq 1
+  test $(grep -c '^am__py_compile =' $f) -eq 1
 done
 
 :