Skip to content

Commit fea0369

Browse files
committed
tools/ci.sh: Add new Unix target with terse error messages.
This commit adds a new CI target for the Unix port, which is the `standard` variant being built with terse error messages. Even though it won't cover all possible tests failing with terse error messages (some occur only in the `coverage` build variant), this should be a good start for preventing new tests to not assume a particular error message level. To make things automated, the new target is also added to the regular CI jobs set in the Unix port's GitHub workflow file. This closes #17707. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 952604c commit fea0369

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/ports_unix.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ jobs:
6767
if: failure()
6868
run: tests/run-tests.py --print-failures
6969

70+
standard_terse:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v6
74+
- name: Build
75+
run: tools/ci.sh unix_standard_terse_build
76+
- name: Run main test suite
77+
run: tools/ci.sh unix_standard_terse_run_tests
78+
- name: Print failures
79+
if: failure()
80+
run: tests/run-tests.py --print-failures
81+
7082
coverage:
7183
runs-on: ubuntu-latest
7284
steps:

ports/unix/variants/mpconfigvariant_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@
8383
#define MICROPY_PY_GC_COLLECT_RETVAL (1)
8484

8585
// Enable detailed error messages and warnings.
86+
#ifndef MICROPY_ERROR_REPORTING
8687
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_DETAILED)
88+
#endif
8789
#define MICROPY_WARNINGS (1)
8890
#define MICROPY_PY_STR_BYTES_CMP_WARN (1)
8991

tools/ci.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,14 @@ function ci_unix_standard_v2_run_tests {
715715
ci_unix_run_tests_full_helper standard
716716
}
717717

718+
function ci_unix_standard_terse_build {
719+
ci_unix_build_helper VARIANT=standard CFLAGS_EXTRA="-DMICROPY_ERROR_REPORTING=MICROPY_ERROR_REPORTING_TERSE"
720+
}
721+
722+
function ci_unix_standard_terse_run_tests {
723+
make -C ports/unix VARIANT=standard test
724+
}
725+
718726
function ci_unix_coverage_setup {
719727
pip3 install setuptools
720728
pip3 install pyelftools

0 commit comments

Comments
 (0)