From f1db8a3097f74aa5499c95a2625bd0bfa285579a Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 27 Jan 2017 12:35:46 +1100 Subject: [PATCH] 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. --- qemu-arm/test_main.c | 2 +- tools/tinytest-codegen.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/qemu-arm/test_main.c b/qemu-arm/test_main.c index ae2beabcd0..5c0c915c48 100644 --- a/qemu-arm/test_main.c +++ b/qemu-arm/test_main.c @@ -32,7 +32,7 @@ inline void do_str(const char *src) { if (nlr_push(&nlr) == 0) { qstr source_name = lex->source_name; mp_parse_tree_t parse_tree = mp_parse(lex, MP_PARSE_FILE_INPUT); - mp_obj_t module_fun = mp_compile(&parse_tree, source_name, MP_EMIT_OPT_NONE, true); + mp_obj_t module_fun = mp_compile(&parse_tree, source_name, MP_EMIT_OPT_NONE, false); mp_call_function_0(module_fun); nlr_pop(); } else { diff --git a/tools/tinytest-codegen.py b/tools/tinytest-codegen.py index 4c245e85ec..3436d0f456 100755 --- a/tools/tinytest-codegen.py +++ b/tools/tinytest-codegen.py @@ -49,7 +49,6 @@ testgroup_member = ( test_dirs = ('basics', 'micropython', 'float', 'extmod', 'inlineasm') # 'import', 'io', 'misc') exclude_tests = ( 'float/float2int_doubleprec.py', # requires double precision floating point to work - 'micropython/heapalloc_str.py', # unknown 'inlineasm/asmfpaddsub.py', 'inlineasm/asmfpcmp.py', 'inlineasm/asmfpldrstr.py', 'inlineasm/asmfpmuldiv.py', 'inlineasm/asmfpsqrt.py', 'extmod/ticks_diff.py', 'extmod/time_ms_us.py', 'extmod/uheapq_timeq.py', 'extmod/machine_pinbase.py', 'extmod/machine_pulse.py',