diff --git a/emu.sh b/emu.sh index 82485e738..9c9f2b11c 100755 --- a/emu.sh +++ b/emu.sh @@ -3,7 +3,7 @@ source emu.config 2>/dev/null EXE=build/unix/micropython -OPTLEVEL="${OPTLEVEL:-0}" +OPTLEVEL="${OPTLEVEL:-1}" MAIN="${MAIN:-main.py}" BROWSER="${BROWSER:-chromium}" if file $EXE | grep -q 80386 ; then diff --git a/tests/run_tests.sh b/tests/run_tests.sh index 66625bbb8..dd27845fe 100755 --- a/tests/run_tests.sh +++ b/tests/run_tests.sh @@ -1,6 +1,7 @@ #!/bin/bash MICROPYTHON=../build/unix/micropython +PYOPT=1 results=() error=0 @@ -13,7 +14,7 @@ fi for i in $list; do echo - if $MICROPYTHON $i; then + if $MICROPYTHON -O$PYOPT $i; then results+=("OK $i") else results+=("FAIL $i") diff --git a/tests/run_tests_device_emu.sh b/tests/run_tests_device_emu.sh index 9e2356101..ab8eeb0cd 100755 --- a/tests/run_tests_device_emu.sh +++ b/tests/run_tests_device_emu.sh @@ -1,8 +1,11 @@ #!/bin/bash +MICROPYTHON=../build/unix/micropython +PYOPT=0 + # run emulator cd ../src -../build/unix/micropython -O0 main.py >/dev/null & +$MICROPYTHON -O$PYOPT main.py >/dev/null & upy_pid=$! sleep 1