Commit 91d0ab9b authored by Damien George's avatar Damien George
Browse files

Merge pull request #504 from lurch/patch-4

Allow the uPy used by run-tests to be overridden
parents 5f82b503 5709453c
......@@ -10,10 +10,10 @@ from glob import glob
# to the correct executable.
if os.name == 'nt':
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3.exe')
MP_PY = '../windows/micropython.exe'
MICROPYTHON = os.getenv('MICROPY_MICROPYTHON', '../windows/micropython.exe')
else:
CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3')
MP_PY = '../unix/micropython'
MICROPYTHON = os.getenv('MICROPY_MICROPYTHON', '../unix/micropython')
# Set of tests that we shouldn't run under Travis CI
skip_travis_tests = set(['basics/memoryerror.py'])
......@@ -40,7 +40,7 @@ if test_on_pyboard:
pyb = pyboard.Pyboard('/dev/ttyACM0')
pyb.enter_raw_repl()
running_under_travis = os.environ.get('TRAVIS', 'false') == 'true'
running_under_travis = os.getenv('TRAVIS') == 'true'
for test_file in tests:
if running_under_travis and test_file in skip_travis_tests:
......@@ -62,7 +62,7 @@ for test_file in tests:
output_mupy = b'CRASH'
else:
try:
output_mupy = subprocess.check_output([MP_PY, '-X', 'emit=bytecode', test_file])
output_mupy = subprocess.check_output([MICROPYTHON, '-X', 'emit=bytecode', test_file])
except subprocess.CalledProcessError:
output_mupy = b'CRASH'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment