Skip to content

Commit f1db8a3

Browse files
committed
qemu-arm: Don't compile tests in "REPL" mode.
Previous to this patch the qemu-arm tests were compiled with is_relp=true meaning that the __repl_print__ function was called for all lines of code in the outer scope. This is not the right behaviour for scripts that are executed as though they were a file (eg tests). With this fix the micropython/heapalloc_str.py test now works so it is removed from the test blacklist.
1 parent cc4c1ad commit f1db8a3

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

qemu-arm/test_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ inline void do_str(const char *src) {
3232
if (nlr_push(&nlr) == 0) {
3333
qstr source_name = lex->source_name;
3434
mp_parse_tree_t parse_tree = mp_parse(lex, MP_PARSE_FILE_INPUT);
35-
mp_obj_t module_fun = mp_compile(&parse_tree, source_name, MP_EMIT_OPT_NONE, true);
35+
mp_obj_t module_fun = mp_compile(&parse_tree, source_name, MP_EMIT_OPT_NONE, false);
3636
mp_call_function_0(module_fun);
3737
nlr_pop();
3838
} else {

tools/tinytest-codegen.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def script_to_map(t):
4949
test_dirs = ('basics', 'micropython', 'float', 'extmod', 'inlineasm') # 'import', 'io', 'misc')
5050
exclude_tests = (
5151
'float/float2int_doubleprec.py', # requires double precision floating point to work
52-
'micropython/heapalloc_str.py', # unknown
5352
'inlineasm/asmfpaddsub.py', 'inlineasm/asmfpcmp.py', 'inlineasm/asmfpldrstr.py', 'inlineasm/asmfpmuldiv.py', 'inlineasm/asmfpsqrt.py',
5453
'extmod/ticks_diff.py', 'extmod/time_ms_us.py', 'extmod/uheapq_timeq.py',
5554
'extmod/machine_pinbase.py', 'extmod/machine_pulse.py',

0 commit comments

Comments
 (0)