From c297ca33276275645f13b20994b7d445e7b272db Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Wed, 16 Apr 2014 20:24:16 +0100 Subject: [PATCH 1/3] Allow the uPy used by run-tests to be overridden with MICROPY_MP_PY envvar, in an analogous way to MICROPY_CPYTHON3 envvar. (the reason for this will be made clearer by a later PR) --- tests/run-tests | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run-tests b/tests/run-tests index bd6e50bbd2942..49be9dae2b08a 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' + MP_PY = os.getenv('MICROPY_MP_PY', '../windows/micropython.exe') else: CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3') - MP_PY = '../unix/micropython' + MP_PY = ('MICROPY_MP_PY', '../unix/micropython') # Set of tests that we shouldn't run under Travis CI skip_travis_tests = set(['basics/memoryerror.py']) @@ -39,7 +39,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: From 6ca17bcfb6a719a625ed76f0354bed7ed014d136 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Wed, 16 Apr 2014 21:17:28 +0100 Subject: [PATCH 2/3] Stupid typo --- tests/run-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/run-tests b/tests/run-tests index 49be9dae2b08a..52fdd11b25811 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -13,7 +13,7 @@ if os.name == 'nt': MP_PY = os.getenv('MICROPY_MP_PY', '../windows/micropython.exe') else: CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3') - MP_PY = ('MICROPY_MP_PY', '../unix/micropython') + MP_PY = os.getenv('MICROPY_MP_PY', '../unix/micropython') # Set of tests that we shouldn't run under Travis CI skip_travis_tests = set(['basics/memoryerror.py']) From 5709453ca7b03a2decb67acb64cdb3e0a788e9fb Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Thu, 17 Apr 2014 01:22:45 +0100 Subject: [PATCH 3/3] Changed the envvar name to MICROPY_MICROPYTHON As discussed in #504 --- tests/run-tests | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run-tests b/tests/run-tests index 52fdd11b25811..cfc0fdee896e8 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 = os.getenv('MICROPY_MP_PY', '../windows/micropython.exe') + MICROPYTHON = os.getenv('MICROPY_MICROPYTHON', '../windows/micropython.exe') else: CPYTHON3 = os.getenv('MICROPY_CPYTHON3', 'python3') - MP_PY = os.getenv('MICROPY_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']) @@ -65,7 +65,7 @@ for test_file in tests: output_mupy = b'CRASH\n' + output_mupy 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' pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy