Skip to content

Commit 6129b8e

Browse files
committed
tests: Rename run-tests to run-tests.py for consistency.
Signed-off-by: Damien George <damien@micropython.org>
1 parent b24fcd7 commit 6129b8e

File tree

21 files changed

+62
-62
lines changed

21 files changed

+62
-62
lines changed

.github/workflows/ports_unix.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
run: source tools/ci.sh && ci_unix_minimal_run_tests
2525
- name: Print failures
2626
if: failure()
27-
run: tests/run-tests --print-failures
27+
run: tests/run-tests.py --print-failures
2828

2929
reproducible:
3030
runs-on: ubuntu-latest
@@ -49,7 +49,7 @@ jobs:
4949
run: source tools/ci.sh && ci_unix_standard_run_perfbench
5050
- name: Print failures
5151
if: failure()
52-
run: tests/run-tests --print-failures
52+
run: tests/run-tests.py --print-failures
5353

5454
coverage:
5555
runs-on: ubuntu-latest
@@ -76,7 +76,7 @@ jobs:
7676
github-token: ${{ secrets.GITHUB_TOKEN }}
7777
- name: Print failures
7878
if: failure()
79-
run: tests/run-tests --print-failures
79+
run: tests/run-tests.py --print-failures
8080

8181
coverage_32bit:
8282
runs-on: ubuntu-latest
@@ -94,7 +94,7 @@ jobs:
9494
run: source tools/ci.sh && ci_unix_coverage_32bit_run_native_mpy_tests
9595
- name: Print failures
9696
if: failure()
97-
run: tests/run-tests --print-failures
97+
run: tests/run-tests.py --print-failures
9898

9999
nanbox:
100100
runs-on: ubuntu-latest
@@ -108,7 +108,7 @@ jobs:
108108
run: source tools/ci.sh && ci_unix_nanbox_run_tests
109109
- name: Print failures
110110
if: failure()
111-
run: tests/run-tests --print-failures
111+
run: tests/run-tests.py --print-failures
112112

113113
float:
114114
runs-on: ubuntu-latest
@@ -120,7 +120,7 @@ jobs:
120120
run: source tools/ci.sh && ci_unix_float_run_tests
121121
- name: Print failures
122122
if: failure()
123-
run: tests/run-tests --print-failures
123+
run: tests/run-tests.py --print-failures
124124

125125
stackless_clang:
126126
runs-on: ubuntu-20.04
@@ -134,7 +134,7 @@ jobs:
134134
run: source tools/ci.sh && ci_unix_stackless_clang_run_tests
135135
- name: Print failures
136136
if: failure()
137-
run: tests/run-tests --print-failures
137+
run: tests/run-tests.py --print-failures
138138

139139
float_clang:
140140
runs-on: ubuntu-20.04
@@ -148,7 +148,7 @@ jobs:
148148
run: source tools/ci.sh && ci_unix_float_clang_run_tests
149149
- name: Print failures
150150
if: failure()
151-
run: tests/run-tests --print-failures
151+
run: tests/run-tests.py --print-failures
152152

153153
settrace:
154154
runs-on: ubuntu-latest
@@ -160,7 +160,7 @@ jobs:
160160
run: source tools/ci.sh && ci_unix_settrace_run_tests
161161
- name: Print failures
162162
if: failure()
163-
run: tests/run-tests --print-failures
163+
run: tests/run-tests.py --print-failures
164164

165165
settrace_stackless:
166166
runs-on: ubuntu-latest
@@ -172,7 +172,7 @@ jobs:
172172
run: source tools/ci.sh && ci_unix_settrace_stackless_run_tests
173173
- name: Print failures
174174
if: failure()
175-
run: tests/run-tests --print-failures
175+
run: tests/run-tests.py --print-failures
176176

177177
macos:
178178
runs-on: macos-11.0
@@ -185,4 +185,4 @@ jobs:
185185
run: source tools/ci.sh && ci_unix_macos_run_tests
186186
- name: Print failures
187187
if: failure()
188-
run: tests/run-tests --print-failures
188+
run: tests/run-tests.py --print-failures

docs/develop/gettingstarted.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ To run a selection of tests on a board/device connected over USB use:
273273
.. code-block:: bash
274274
275275
$ cd tests
276-
$ ./run-tests --target minimal --device /dev/ttyACM0
276+
$ ./run-tests.py --target minimal --device /dev/ttyACM0
277277
278278
See also :ref:`writingtests`.
279279

docs/develop/writingtests.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Writing tests
44
=============
55

66
Tests in MicroPython are located at the path ``tests/``. The following is a listing of
7-
key directories and the run-tests runner script:
7+
key directories and the run-tests.py runner script:
88

99
.. code-block:: bash
1010
@@ -13,7 +13,7 @@ key directories and the run-tests runner script:
1313
├── extmod
1414
├── float
1515
├── micropython
16-
├── run-tests
16+
├── run-tests.py
1717
...
1818
1919
There are subfolders maintained to categorize the tests. Add a test by creating a new file in one of the
@@ -54,17 +54,17 @@ The other way to run tests, which is useful when running on targets other than t
5454
.. code-block:: bash
5555
5656
$ cd tests
57-
$ ./run-tests
57+
$ ./run-tests.py
5858
5959
Then to run on a board:
6060

6161
.. code-block:: bash
6262
63-
$ ./run-tests --target minimal --device /dev/ttyACM0
63+
$ ./run-tests.py --target minimal --device /dev/ttyACM0
6464
6565
And to run only a certain set of tests (eg a directory):
6666

6767
.. code-block:: bash
6868
69-
$ ./run-tests -d basics
70-
$ ./run-tests float/builtin*.py
69+
$ ./run-tests.py -d basics
70+
$ ./run-tests.py float/builtin*.py

ports/cc3200/tools/smoke.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77
Execute it like this:
88
9-
python3 run-tests --target wipy --device 192.168.1.1 ../cc3200/tools/smoke.py
9+
python3 run-tests.py --target wipy --device 192.168.1.1 ../cc3200/tools/smoke.py
1010
"""
1111

1212
pin_map = [23, 24, 11, 12, 13, 14, 15, 16, 17, 22, 28, 10, 9, 8, 7, 6, 30, 31, 3, 0, 4, 5]

ports/javascript/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ $(BUILD)/micropython.js: $(OBJ) library.js wrapper.js
6363
min: $(BUILD)/micropython.js
6464
uglifyjs $< -c -o $(BUILD)/micropython.min.js
6565

66-
test: $(BUILD)/micropython.js $(TOP)/tests/run-tests
66+
test: $(BUILD)/micropython.js $(TOP)/tests/run-tests.py
6767
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
68-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests
68+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../ports/javascript/node_run.sh ./run-tests.py
6969

7070
include $(TOP)/py/mkrules.mk

ports/qemu-arm/Makefile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CFLAGS += -DTEST
1010

1111
$(BUILD)/test_main.o: $(BUILD)/genhdr/tests.h
1212
$(BUILD)/genhdr/tests.h:
13-
(cd $(TOP)/tests; ./run-tests --target=qemu-arm --write-exp)
13+
(cd $(TOP)/tests; ./run-tests.py --target=qemu-arm --write-exp)
1414
$(Q)echo "Generating $@";(cd $(TOP)/tests; ../tools/tinytest-codegen.py) > $@
1515

1616
$(BUILD)/lib/tinytest/tinytest.o: CFLAGS += -DNO_FORKING

ports/unix/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,17 +292,17 @@ include $(TOP)/py/mkrules.mk
292292

293293
.PHONY: test test_full
294294

295-
test: $(PROG) $(TOP)/tests/run-tests
295+
test: $(PROG) $(TOP)/tests/run-tests.py
296296
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
297-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests
297+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests.py
298298

299-
test_full: $(PROG) $(TOP)/tests/run-tests
299+
test_full: $(PROG) $(TOP)/tests/run-tests.py
300300
$(eval DIRNAME=ports/$(notdir $(CURDIR)))
301-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests
302-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests -d thread
303-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --emit native
304-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) -d basics float micropython
305-
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) --emit native -d basics float micropython
301+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests.py
302+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests.py -d thread
303+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests.py --emit native
304+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests.py --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) -d basics float micropython
305+
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests.py --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) --emit native -d basics float micropython
306306
cat $(TOP)/tests/basics/0prelim.py | ./$(PROG) | grep -q 'abc'
307307

308308
test_gcov: test_full

ports/windows/.appveyor.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ build:
3737
test_script:
3838
- ps: |
3939
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'tests')
40-
& $env:MICROPY_CPYTHON3 run-tests
40+
& $env:MICROPY_CPYTHON3 run-tests.py
4141
if ($LASTEXITCODE -ne 0) {
42-
& $env:MICROPY_CPYTHON3 run-tests --print-failures
42+
& $env:MICROPY_CPYTHON3 run-tests.py --print-failures
4343
throw "Test failure"
4444
}
45-
& $env:MICROPY_CPYTHON3 run-tests --via-mpy -d basics float micropython
45+
& $env:MICROPY_CPYTHON3 run-tests.py --via-mpy -d basics float micropython
4646
if ($LASTEXITCODE -ne 0) {
47-
& $env:MICROPY_CPYTHON3 run-tests --print-failures
47+
& $env:MICROPY_CPYTHON3 run-tests.py --print-failures
4848
throw "Test failure"
4949
}
5050
@@ -71,17 +71,17 @@ after_test:
7171
throw "$env:MSYSTEM mpy_cross build exited with code $LASTEXITCODE"
7272
}
7373
cd (Join-Path $env:APPVEYOR_BUILD_FOLDER 'tests')
74-
$testArgs = @('run-tests')
74+
$testArgs = @('run-tests.py')
7575
foreach ($skipTest in @('math_fun', 'float2int_double', 'float_parse', 'math_domain_special')) {
7676
$testArgs = $testArgs + '-e' + $skipTest
7777
}
7878
& $env:MICROPY_CPYTHON3 $testArgs
7979
if ($LASTEXITCODE -ne 0) {
80-
& $env:MICROPY_CPYTHON3 run-tests --print-failures
80+
& $env:MICROPY_CPYTHON3 run-tests.py --print-failures
8181
throw "Test failure"
8282
}
8383
& $env:MICROPY_CPYTHON3 ($testArgs + @('--via-mpy', '-d', 'basics', 'float', 'micropython'))
8484
if ($LASTEXITCODE -ne 0) {
85-
& $env:MICROPY_CPYTHON3 run-tests --print-failures
85+
& $env:MICROPY_CPYTHON3 run-tests.py --print-failures
8686
throw "Test failure"
8787
}

ports/windows/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ Running the tests
9090
This is similar for all ports:
9191

9292
cd ../../tests
93-
python ./run-tests
93+
python ./run-tests.py
9494

9595
Though when running on Cygwin and using Cygwin's Python installation you'll need:
9696

97-
python3 ./run-tests
97+
python3 ./run-tests.py
9898

9999
Depending on the combination of platform and Python version used it might be
100100
needed to first set the MICROPY_MICROPYTHON environment variable to

ports/zephyr/make-bin-testsuite

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# ./make-bin-testsuite BOARD=qemu_cortex_m3 run
99
#
1010

11-
(cd ../../tests; ./run-tests --write-exp)
12-
(cd ../../tests; ./run-tests --list-tests --target=minimal \
11+
(cd ../../tests; ./run-tests.py --write-exp)
12+
(cd ../../tests; ./run-tests.py --list-tests --target=minimal \
1313
-e async -e intbig -e int_big -e builtin_help -e memstats -e bytes_compare3 -e class_reverse_op \
1414
-e /set -e frozenset -e complex -e const -e native -e viper \
1515
-e 'float_divmod\.' -e float_parse_doubleprec -e float/true_value -e float/types \

0 commit comments

Comments
 (0)