summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-19py/modio: Use correct config macro to enable resource_stream function.Damien George
2017-12-19tests/extmod: Add some uctypes tests to improve coverage of that module.Damien George
2017-12-19tests: Add some more tests to improve coverage of py/parse.c.Damien George
2017-12-19py/mpz: Apply a small code-size optimisation.Damien George
2017-12-19tests/basics/builtin_pow3: Add tests for edge cases of pow3.Damien George
2017-12-19py/mpz: Fix pow3 function so it handles the case when 3rd arg is 1.Damien George
In this case the result should always be 0, even if 2nd arg is 0.
2017-12-19tests/basics/generator_pend_throw: Add test for just-started generator.Damien George
2017-12-19tests/unix: Add test for printf with %lx format.Damien George
2017-12-19tests/float/builtin_float_hash: Add test to improve objfloat.c coverage.Damien George
2017-12-19tests/extmod/uhashlib_sha256: Add test for hashing 56 bytes of data.Damien George
2017-12-19py/objset: Remove unneeded check from set_equal.Damien George
set_equal is called only from set_binary_op, and this guarantees that the second arg to set_equal is always a set or frozenset. So there is no need to do a further check.
2017-12-19tests/basics: Add more set tests to improve coverage of py/objset.c.Damien George
2017-12-19py/map: Don't include ordered-dict mutating code when not needed.Damien George
2017-12-19py/runtime: Remove unnecessary break statements from switch.Damien George
2017-12-18esp32/machine_hw_spi: Remove unnecessary white space for consistency.Damien George
2017-12-18esp32/machine_hw_spi: Fix large HW SPI transfers by splitting them up.Eric Poulsen
Breaks up HW SPI transfers into maximum chunks of 32736 bits (4092 bytes), because this is the maximum that the underlying ESP IDF will accept.
2017-12-16.travis.yml: Build and test strict stackless build.Paul Sokolovsky
Previously, testing of stackless build happened (manually) in travis-stackless branch. However, stackless offers important featureset, so it's worth to test it as a part of the main CI. Strict stackless is used because it's the "real" stackless build, which avoids using C stack as much as possible (non-strict just prefers heap over C stack, but may end up using the latter).
2017-12-16unix/mpconfigport.h: Allow to override stackless options from commandline.Paul Sokolovsky
2017-12-16unix/Makefile: coverage: Allow user to pass CFLAGS_EXTRA.Paul Sokolovsky
This build sets CFLAGS_EXTRA itself, but preserve user's value as passed on make command line/etc.
2017-12-16docs/packages: Explicitly recommend usage of setuptools instead of distutils.Paul Sokolovsky
2017-12-16docs/packages: Use "install_dir/" in examples.Paul Sokolovsky
2017-12-16docs/conf: Reference CPython 3.5 docs.Paul Sokolovsky
CPython 3.6 contains some backward incompatible changes, and further version(s) are expected to have more. As we anyway implemente 3.4 with some features of 3.5, refer to 3.5 docs to avoid confusion. Examples of 3.6 backward incompatibilities: https://docs.python.org/3.6/library/json.html#json.dump https://docs.python.org/3.6/library/json.html#json.load > Changed in version 3.6: All optional parameters are now keyword-only. https://docs.python.org/3.6/library/functions.html#type > Changed in version 3.6: Subclasses of type which don’t override > type.__new__ may no longer use the one-argument form to get the > type of an object. https://docs.python.org/3.6/library/collections.html#collections.namedtuple > Changed in version 3.6: The verbose and rename parameters became > keyword-only arguments.
2017-12-15py/objgenerator: Allow to pend an exception for next execution.Paul Sokolovsky
This implements .pend_throw(exc) method, which sets up an exception to be triggered on the next call to generator's .__next__() or .send() method. This is unlike .throw(), which immediately starts to execute the generator to process the exception. This effectively adds Future-like capabilities to generator protocol (exception will be raised in the future). The need for such a method arised to implement uasyncio wait_for() function efficiently (its behavior is clearly "Future" like, and normally would require to introduce an expensive Future wrapper around all native couroutines, like upstream asyncio does). py/objgenerator: pend_throw: Return previous pended value. This effectively allows to store an additional value (not necessary an exception) in a coroutine while it's not being executed. uasyncio has exactly this usecase: to mark a coro waiting in I/O queue (and thus not executed in the normal scheduling queue), for the purpose of implementing wait_for() function (cancellation of such waiting coro by a timeout).
2017-12-15lib/tinytest: Clean up test reporting in the presence of stdout output.Paul Sokolovsky
tinytest is written with the idea that tests won't write to stdout, so it prints test name witjout newline, then executes test, then writes status. But MicroPython tests write to stdout, so the test output becomes a mess. So, instead print it like: # starting basics/andor.py ... test output ... basics/andor.py: OK
2017-12-15zephyr/prj_base.conf: Bump MAIN_STACK_SIZE to let builtin testsuite run.Paul Sokolovsky
2017-12-15zephyr: Add support for binary with builtin testsuite.Paul Sokolovsky
If TEST is defined, file it refers to will be used as the testsuite source (should be generated with tools/tinytest-codegen.py). "make-bin-testsuite" script is introduce to build such a binary.
2017-12-15tests/run-tests: Skip running feature checks for --list-tests/--write-exp.Paul Sokolovsky
The whole idea of --list-tests is that we prepare a list of tests to run later, and currently don't have a connection to target board. Similarly for --write-exp - only "python3" binary would be required for this operation, not "micropython".
2017-12-15tools/tinytest-codegen: Ignore system locale, write output in UTF-8.Paul Sokolovsky
Way to reproduce a UnicodeEncodeError without this patch: LC_ALL=C tinytest-codegen.py ...
2017-12-15py/emitglue: Change type of bit-field to explicitly unsigned mp_uint_t.Damien George
Some compilers can treat enum types as signed, in which case 3 bits is not enough to encode all mp_raw_code_kind_t values. So change the type to mp_uint_t.
2017-12-15docs/glossary: micropython-lib: Clarify wording.Paul Sokolovsky
2017-12-14docs/packages: mpy_bin2res no longer required to create resources.Paul Sokolovsky
Everything happens automagically with overridden "sdist" from sdist_upip.py.
2017-12-14tests/run-tests: Don't test for --target=unix with "pyb is None".Paul Sokolovsky
If we test for unix target, do that explicitly. pyb var will be None for commands like --list-tests too.
2017-12-14tools/tinytest-codegen: Add --stdin switch instead of recently added --target.Paul Sokolovsky
Instead of passing thru more and more options from tinytest-codegen to run-tests --list-tests, pipe output of run-tests --list-tests into tinytest-codegen.
2017-12-14tests/run-tests: Add composable --include and --exclude options.Paul Sokolovsky
The idea that --list-tests would be enough to produce list of tests for tinytest-codegen didn't work, because normal run-tests processing heavily relies on dynamic target capabilities discovery, and test filtering happens as the result of that. So, approach the issue from different end - allow to specify arbitrary filtering criteria as run-tests arguments. This way, specific filters will be still hardcoded, but at least on a particular target's side, instead of constant patching tinytest-codegen and/or run-tests.
2017-12-14tests/run-tests: Fix handling of --list-tests wrt skipped tests.Paul Sokolovsky
"skip <test>" message could leak before.
2017-12-14tests/run-tests: minimal: Exclude recently added subclass_native_init.py.Paul Sokolovsky
It relies on MICROPY_CPYTHON_COMPAT being defined.
2017-12-14extmod/modframebuf: Add 8-bit greyscale format (GS8).Damien George
2017-12-14extmod/modframebuf: Add 2-bit color format (GS2_HMSB).Petr Viktorin
This format is used in 2-color LED matrices and in e-ink displays like SSD1606.
2017-12-14tests: Add tests to improve coverage of py/objtype.c.Damien George
2017-12-14esp8266/machine_hspi: After an SPI write wait for last byte to transfer.Damien George
Because otherwise the function can return with data still waiting to be clocked out, and CS might then be disabled before the SPI transaction is complete. Fixes issue #3487.
2017-12-14tools/pydfu.py: Call set_configuration() on fresh USB device object.Damien George
This call is required before using the device (some operating systems don't need it but others do). Fixes issue #3476.
2017-12-13tools/tinytest-codegen: Take --target= option for test set selection.Paul Sokolovsky
Gets passed to run-tests --list-tests to get actual list of tests to use. If --target= is not given, legacy set hardcoded in tinytest-codegen itself is used. Also, get rid of tinytest test groups - they aren't really used for anything, and only complicate processing. Besides, one of the next step is to limit number of tests per a generated file to control the binary size, which also will require "flat" list of tests.
2017-12-13tests/run-tests: Add --list-tests switch.Paul Sokolovsky
Lists tests to be executed, subject to all other filters requested. This options would be useful e.g. for scripts like tools/tinytest-codegen.py, which currently contains hardcoded filters for particular a particular target and can't work for multiple targets.
2017-12-13extmod/modure: Add cast to workaround bug in MSVC.Damien George
2017-12-13stm32/usbdev: Pass thru correct val for SCSI PreventAllowMediumRemoval.Damien George
This value is "1" when the medium should not be removed, "0" otherwise.
2017-12-13.travis.yml: Update for qemu-arm's testing moved to Makefile.test.Paul Sokolovsky
2017-12-13ports/qemu-arm: Rework "test" target using upytesthelper.Paul Sokolovsky
The way tinytest was used in qemu-arm test target is that it didn't test much. MicroPython tests are based on matching the test output against reference output, but qemu-arm's implementation didn't do that, it effectively tested just that there was no exception during test execution. "upytesthelper" wrapper was introduce to fix it, so switch test implementation to use it. This requires passing different CFLAGS when building the firmware, so split out test-related parts to Makefile.test.
2017-12-13tools/tinytest-codegen: More excludes after enabling expected output match.Paul Sokolovsky
2017-12-13tools/tinytest-codegen: Wrap lines of exclude_tests.Paul Sokolovsky
So it was manageable and extensible.
2017-12-13tools/tinytest-codegen.py: Generate code for upytesthelper.Paul Sokolovsky
The way tinytest was used in qemu-arm test target is that it didn't test much. MicroPython tests are based on matching the test output against reference output, but qemu-arm's implementation didn't do that, it effectively tested just that there was no exception during test execution. "upytesthelper" wrapper was introduce to fix it, and so test generator is now switched to generate test code for it. Also, fix PEP8 and other codestyle issues.