summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2020-03-30 10:14:09 +0200
committerDamien George <damien.p.george@gmail.com>2020-04-13 16:43:01 +1000
commitf66c9895169090e05ba5d0d9fc9b191dc072c96f (patch)
treef61e33b363dc5c9554fb0cbe5d9a42fa17eef1ca /tests
parente880c8dfaac9d45fea7b086ac5e7d45e0e92e57e (diff)
tests/run-tests: Make diff tool user configurable.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/run-tests b/tests/run-tests
index 2240697b6..831d2eab5 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -21,6 +21,9 @@ else:
# mpy-cross is only needed if --via-mpy command-line arg is passed
MPYCROSS = os.getenv('MICROPY_MPYCROSS', '../mpy-cross/mpy-cross')
+# For diff'ing test output
+DIFF = os.getenv('MICROPY_DIFF', 'diff -u')
+
# Set PYTHONIOENCODING so that CPython will use utf-8 on systems which set another encoding in the locale
os.environ['PYTHONIOENCODING'] = 'utf-8'
@@ -595,7 +598,7 @@ the last matching regex is used:
testbase = os.path.basename(exp)[:-4]
print()
print("FAILURE {0}".format(testbase))
- os.system("diff -u {0}.exp {0}.out".format(testbase))
+ os.system("{0} {1}.exp {1}.out".format(DIFF, testbase))
sys.exit(0)