diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-17 17:20:26 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-17 17:20:26 +0100 |
commit | 91d0ab9b0f695cf37198b518428480890bd05195 (patch) | |
tree | 5348a6a31c66286c1f1b335a45c7bb835cfc5210 /tests/run-tests | |
parent | 5f82b50324d83f963995a6c994eb73435b9660ba (diff) | |
parent | 5709453ca7b03a2decb67acb64cdb3e0a788e9fb (diff) | |
download | micropython-91d0ab9b0f695cf37198b518428480890bd05195.tar.gz micropython-91d0ab9b0f695cf37198b518428480890bd05195.zip |
Merge pull request #504 from lurch/patch-4
Allow the uPy used by run-tests to be overridden
Diffstat (limited to 'tests/run-tests')
-rwxr-xr-x | tests/run-tests | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/run-tests b/tests/run-tests index da18c6c765..9e94026fa2 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -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' |