Damien George
2c915e1ae6
py: Implement basic with support in native emitter.
9 years ago
Damien George
157056ecdf
tests: Add new subdir "stress/" specifically for stress tests.
9 years ago
Damien George
9996adc37d
tests/run-tests: Add cmd line option "--heapsize".
This allows you to specify the heapsize that unix will use when running
the test suite, eg: ./run-tests --heapsize 16k
9 years ago
Damien George
f0e2d13fd2
tests/run-tests: Simplify handling of newline in output from tests.
Now, all output has newlines converted to \n, regardless of port or
platform.
9 years ago
Damien George
d964873e56
tests/run-tests: Fix logic when selecting test-dirs for a given target.
9 years ago
Paul Sokolovsky
2382d30318
tests/run-tests: Skips for esp8266.
9 years ago
danicampora
5148860332
tests: Skip uctypes and urandom tests not supported byt the WiPy.
9 years ago
Paul Sokolovsky
2850e7cd97
tests/run-tests: Add esp8266 target.
9 years ago
Damien George
e5ce5e2a43
tests: Skip class_bind_self.py for native emitter.
9 years ago
Damien George
7ce8860b6b
tests: Skip try-finally test for native emitter.
9 years ago
Damien George
0891cf7d2d
tests: Disable for_range.py test for native emitter (it requires yield).
9 years ago
Paul Sokolovsky
eed2f36ae2
tests/run-tests: Allow to skip complex tests if it's not compiled in.
9 years ago
Paul Sokolovsky
ff8c4188f4
tests/run-tests: Improve robustness of REPL tests.
Unconditionally wait for MicroPython banner. On overloaded systems, when
using emulators, etc. initial executable startup may take more than 20ms.
9 years ago
stijn
24b03561bd
tests: Make sure test output has \r\n line-ends when running on Windows
This is the case already when using just subprocess.check_output, but in
the special cases (cmdline, meminfo, ...) the carriage return gets lost
during output processing so restore it in the end.
This fixes the micropython/meminfo.py test on Windows.
9 years ago
Damien George
e693e52442
tests: Disable some tests for pyboard that do not run correctly.
9 years ago
Damien George
4300c7dba2
py: Remove dependency on printf/fwrite in mp_plat_print.
See issue #1500 .
9 years ago
Damien George
0334058fa4
Rename "Micro Python" to "MicroPython" in REPL, help, readme's and misc.
9 years ago
Daniel Campora
d5de1bf853
tests: Skip uheapq1 test if target is WiPy.
9 years ago
Daniel Campora
958e273336
tests: Skip extmod machine tests when target is WiPy.
9 years ago
stijn
dfa915a6af
tests: Omit process output parsing in case of CalledProcessError
Adding a line-end makes the determination of skip_native fail as it compares
the output against b'CRASH' while it is in fact b'CRASH\n'
9 years ago
Daniel Campora
88ca6c94d9
tests: Ignore exception chain test on the WiPy.
Fails because warnings are not enabled on the CC3200.
9 years ago
Daniel Campora
d5e256486e
cc3200: Re-work Pin class according to the new API.
Also add relevant test.
9 years ago
Paul Sokolovsky
1b693543aa
tests: Skip exception_chain.py with native emitter.
9 years ago
Paul Sokolovsky
a3fe307400
tests: Consolidate all feature check snippets under feature_check/.
9 years ago
Paul Sokolovsky
0a8b5d160b
run-tests: Allow to skip byteorder-dependent tests.
If byteorder of MicroPython under test and host CPython differ.
9 years ago
stijn
dbfba6a20e
tests: Fix exceptions when running cmdline tests on windows
- subprocess.check_output can only handle strings on windows, not bytes,
so convert the arguments as such
- the pty module is for posix systems only so skip the tests needing it
in case it is not available
9 years ago
stijn
7ede3ec4b1
tests: Always use forward slashes for paths
This is more consistent and fixes run_micropython on windows as it uses
forward slahses to compare paths
9 years ago
Tom Soulanille
89852d38ef
run-tests: Test REPL emacs keys, but only if present.
Uses cmdline/repl_emacs_check.py to check for presence of emacs keys in
repl before doing full feature test.
9 years ago
Tom Soulanille
3dd0b69e46
run-tests: Use PTY when running REPL tests.
9 years ago
Daniel Campora
cd14188bc8
tools: Add telnet support to pyboard.py.
The adapter class "TelnetToSerial" is used to access the Telnet
connection using the same API as with the serial connection. The
function pyboard.run-test() has been removed to made the module
generic and because this small test is no longer needed.
10 years ago
Damien George
e44c1d3ace
tests: Split out json float tests to separate files.
10 years ago
Daniel Campora
186b355b28
tests: Add support for the WiPy in run-tests script.
The --pyboard param has been replaced by --target which defaults to
'unix'. Possible values at this moment are 'unix', 'pyboard' and
'wipy'. Now is also possible to select the baud rate of the serial
device when calling the script.
10 years ago
Damien George
031278f661
unix: Allow to cat a script into stdin from the command line.
See issue #1306 .
10 years ago
Paul Sokolovsky
8b85d14b92
modsys: Add basic sys.exc_info() implementation.
The implementation is very basic and non-compliant and provided solely for
CPython compatibility. The function itself is bad Python2 heritage, its
usage is discouraged.
10 years ago
Damien George
9988618e0e
py: Implement full func arg passing for native emitter.
This patch gets full function argument passing working with native
emitter. Includes named args, keyword args, default args, var args
and var keyword args. Fully Python compliant.
It reuses the bytecode mp_setup_code_state function to do all the hard
work. This function is slightly adjusted to accommodate native calls,
and the native emitter is forced a bit to emit similar prelude and
code-info as bytecode.
10 years ago
Damien George
78772ada0d
py: Implement calling functions with *args in native emitter.
10 years ago
Damien George
9dd3640464
tests: Add missing tests for builtins, and many other things.
10 years ago
Damien George
4cd9ced8dc
py: Implement closures in native code generator.
Currently supports only x64 and Thumb2 archs.
10 years ago
Damien George
23d7fd526d
tests: Skip some new tests when testing native emitter.
10 years ago
Damien George
1004535237
tests: Make cmdline tests more stable by using regex for matching.
10 years ago
Damien George
143c34109c
tests: Add ability to test uPy cmdline executable.
This allows to test options passed to cmdline executable, as well as the
behaviour of the REPL.
10 years ago
Damien George
72ddcfd9ff
tests: Skip basics/boundmeth1.py for native emitter.
10 years ago
Damien George
e8b877be60
tests: Disable float/cmath_fun.py for native emitter.
10 years ago
Damien George
b6e6b5277f
py: Implement proper re-raising in native codegen's finally handler.
This allows an exception to propagate correctly through a finally
handler.
10 years ago
Damien George
ad2307c92c
py: Temporary fix for conversion of float to int when fits in small int.
Addresses issue #1044 (see also #1040 ). Could do with a better fix.
10 years ago
Damien George
816a46a4ab
tests: Disable float/float2int.py on pyboard (needs double prec).
10 years ago
Paul Sokolovsky
978f4ca2e1
run-tests: Allow to run testuite against Windows build on Linux (using Wine).
Just adjust line-endings of micropython.exe output, the rest should be
handled by Wine (automagically on properly configured distro).
To run:
MICROPY_MICROPYTHON=../windows/micropython.exe ./run-tests
10 years ago
stijn
f5efefd5a0
windows: Correctly interpret skipped tests, enable uhashlib and ubinascii
10 years ago
Paul Sokolovsky
138562ccd9
run-tests: Skip native/viper tests based on prefix.
Otherwise, new tests are forgotten to be added to explicit lists. Issue
found running on Debian/ARM.
10 years ago
Paul Sokolovsky
1ca28bd570
run-tests: Reset MICROPYPATH, to make sure tests use only builtin modules.
10 years ago