summaryrefslogtreecommitdiffstatshomepage
path: root/ports/unix/variants/coverage
Commit message (Collapse)AuthorAge
* unix/variants: Enable os.uname() in coverage build for tests.Yoctopuce dev2025-04-21
| | | | | | | In order to provide test coverage for the previous commit, `os.uname()` support is added to the unix coverage build. Signed-off-by: Yoctopuce dev <dev@yoctopuce.com>
* unix/main: Add coverage test for mounting ROMFS filesystem at startup.Damien George2025-03-06
| | | | Signed-off-by: Damien George <damien@micropython.org>
* tests/ports/unix: Add coverage test for frozen functions and generators.Damien George2024-02-16
| | | | Signed-off-by: Damien George <damien@micropython.org>
* unix/variants: Prefer unix-ffi packages when loading the manifest.Damien George2024-02-08
| | | | Signed-off-by: Damien George <damien@micropython.org>
* extmod/modtls: Move the native ssl module to tls.Felix Dörre2024-02-07
| | | | | | | | | | | | | The current `ssl` module has quite a few differences to the CPython implementation. This change moves the MicroPython variant to a new `tls` module and provides a wrapper module for `ssl` (in micropython-lib). Users who only rely on implemented comparible behavior can continue to use `ssl`, while users that rely on non-compatible behavior should switch to `tls`. Then we can make the facade in `ssl` more strictly adhere to CPython. Signed-off-by: Felix Dörre <felix@dogcraft.de>
* all: Rename UMODULE to MODULE in preprocessor/Makefile vars.Jim Mussared2023-06-08
| | | | | | This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* extmod/btstack: Fix indicate/notify queuing.Jim Mussared2023-04-26
| | | | | | | | | | | This adds a mechanism to track a pending notify/indicate operation that is deferred due to the send buffer being full. This uses a tracked alloc that is passed as the content arg to the callback. This replaces the previous mechanism that did this via the global pending op queue, shared with client read/write ops. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* unix/variants/coverage: Add test for manifest freeze_mpy().Jim Mussared2022-09-19
| | | | | | | | | | | | This uses the frozentest.mpy that is also used by ports/minimal. Also fixes two bugs that these new tests picked up: - File extension matching in manifestfile.py. - Handling of freeze_mpy results in makemanifest. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* unix: Refactor mpconfigvariant.mk.Jim Mussared2022-09-13
| | | | | | | All variants (except minimal) enable text compression and fat/lfs, so move them to the common mpconfigport.mk. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* py/mpconfig: Add "everything" features from unix coverage.Jim Mussared2022-09-13
| | | | Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* unix: Refactor mpconfigport.h and mpconfigvariant.h.Jim Mussared2022-09-13
| | | | | | | | | This is a no-op for coverage and minimal. The standard and dev variants have been merged and enable the same feature set as a typical bare-metal board. And remove the CI for the dev build. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* unix/variants: Remove variant suffix from executable filename.Damien George2022-08-11
| | | | | | | | The executable now lives in the build directory, and since the build directory already contains the variant name there is no need to also add it to the executable. Signed-off-by: Damien George <damien@micropython.org>
* unix: Enable MICROPY_GC_SPLIT_HEAP on coverage build.Rob Knegjens2022-07-23
| | | | | | With a new option to evenly split the GC heap over multiple areas. This adds code coverage for gc_add() and code associated with MICROPY_GC_SPLIT_HEAP.
* unix/variants/coverage: Change config to use ROM level everything.Damien George2022-06-29
| | | | | | | | This ROM level is not yet fully defined, but it at least enables MICROPY_PY_SYS_TRACEBACKLIMIT. The coverage build should have everything enabled, so it makes sense to use this ROM level for it. Signed-off-by: Damien George <damien@micropython.org>
* unix/variants: Enable remaining options on dev,coverage from ROM extra.Damien George2022-06-29
| | | | | | | | | | So that the default configuration for the dev and coverage variants includes all options set by MICROPY_CONFIG_ROM_LEVEL_EXTRA_FEATURES. Note that enabling MICROPY_PY_SYS_STDIO_BUFFER on unix doesn't do anything because unix doesn't use shared/runtime/sys_stdio_mphal.c. Signed-off-by: Damien George <damien@micropython.org>
* unix/variants: Move setting of MICROPY_PY_USELECT to port config file.Damien George2022-06-29
| | | | | | | | | | The default is the same as before: MICROPY_PY_USELECT=0 and MICROPY_PY_USELECT_POSIX=1. But now this can be easily overridden at the make command-line using, eg: make VARIANT=dev CFLAGS_EXTRA=-DMICROPY_PY_USELECT=1 Signed-off-by: Damien George <damien@micropython.org>
* unix/variants: Enable seeding random module on import in dev, coverage.Damien George2022-06-07
| | | | Signed-off-by: Damien George <damien@micropython.org>
* py/malloc: Introduce m_tracked_calloc, m_tracked_free functions.Damien George2022-05-05
| | | | | | Enabled by MICROPY_TRACKED_ALLOC. Signed-off-by: Damien George <damien@micropython.org>
* ports: Reformat more C and Python source code.Damien George2022-04-20
| | | | | | | These files that are reformatted only now fall under the list of files to apply uncrustify/black formatting to. Signed-off-by: Damien George <damien@micropython.org>
* unix/variants: Enable a few optimisations and features on dev, coverage.Damien George2022-03-10
| | | | Signed-off-by: Damien George <damien@micropython.org>
* unix/variants: Use rom feature config for standard, dev, coverage.Damien George2022-03-10
| | | | | | This change is a no-op in terms of functionality. Signed-off-by: Damien George <damien@micropython.org>
* py/modsys: Add optional mutable attributes sys.ps1/ps2 and use them.Damien George2022-03-10
| | | | | | This allows customising the REPL prompt strings. Signed-off-by: Damien George <damien@micropython.org>
* py/modsys: Add optional sys.tracebacklimit attribute.Damien George2022-03-10
| | | | | | With behaviour as per CPython. Signed-off-by: Damien George <damien@micropython.org>
* unix/moduos: Convert module to use extmod version.Damien George2022-03-09
| | | | | | | | | | | | | All variants now use extmod/moduos.c as their uos module implementation. In particular this means they all have MICROPY_VFS enabled and use VfsPosix for their filesystem. As part of this, the available functions in uos become more consistent with other ports: - coverage variant gets uos.urandom - minimal and standard variant get: unlink, chdir, getcwd, listdir Signed-off-by: Damien George <damien@micropython.org>
* tests/unix: Add coverage test for freezing various objects.Damien George2022-02-28
| | | | Signed-off-by: Damien George <damien@micropython.org>
* py/modmath: Add math.tau, math.nan and math.inf constants.stijn2022-01-23
| | | | Configurable by the new MICROPY_PY_MATH_CONSTANTS option.
* py/modio: Remove io.resource_stream function.Jim Mussared2021-12-17
| | | | | | This feature is not enabled on any port, it's not in CPython's io module, and functionality is better suited to the micropython-lib implementation of pkg_resources.
* examples/usercmodules: Simplify user C module enabling.Damien George2021-04-01
| | | | | | | | | | | | It's a bit of a pitfall with user C modules that including them in the build does not automatically enable them. This commit changes the docs and examples for user C modules to encourage writers of user C modules to enable them unconditionally. This makes things simpler and covers most use cases. See discussion in issue #6960, and also #7086. Signed-off-by: Damien George <damien@micropython.org>
* unix/Makefile: Move coverage.c and coveragecpp.cpp to coverage variant.Damien George2020-10-29
| | | | | | So that g++ is not needed to build a non-coverage unix variant. Signed-off-by: Damien George <damien@micropython.org>
* examples: Add example code for user C modules, both C and C++.stijn2020-10-29
| | | | | | | | Add working example code to provide a starting point for users with files that they can just copy, and include the modules in the coverage test to verify the complete user C module build functionality. The cexample module uses the code originally found in cmodules.rst, which has been updated to reflect this and partially rewritten with more complete information.
* unix/variants: Enable MICROPY_DEBUG_PARSE_RULE_NAME on coverage build.Damien George2020-10-01
| | | | Signed-off-by: Damien George <damien@micropython.org>
* tests/basics: Add test for MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS ops.Damien George2020-09-18
| | | | | | | | And enable this feature on unix, the coverage variant. The .exp test file is needed so the test can run on CPython versions prior to "@=" operator support. Signed-off-by: Damien George <damien@micropython.org>
* unix: Implement BLE H4 HCI UART for btstack/nimble.Jim Mussared2020-09-08
| | | | | | | | | | | | This commit adds support for using Bluetooth on the unix port via a H4 serial interface (distinct from a USB dongle), with both BTstack and NimBLE Bluetooth stacks. Note that MICROPY_PY_BLUETOOTH is now disabled for the coverage variant. Prior to this commit Bluetooth was anyway not being built on Travis because libusb was not detected. But now that bluetooth works in H4 mode it will be built, and will lead to a large decrease in coverage because Bluetooth tests cannot be run on Travis.
* unix: Make manifest selection match other ports.Jim Mussared2020-07-01
| | | | | | | | | Changes are: - The default manifest.py is moved to the variants directory (it's in "boards" in other ports). - The coverage variant now uses a custom manifest in its variant directory to add frzmpy/frzstr. - The frzmpy/frzstr tests are moved to variants/coverage/.
* unix: Enable modbluetooth on the "dev" and "coverage" variants.Jim Mussared2020-04-29
| | | | | And MICROPY_PY_URANDOM_EXTRA_FUNCS is enabled on "dev" so tha the Bluetooth examples all run.
* all: Enable extra conversion warnings where applicable.stijn2020-04-18
| | | | | | | | Add -Wdouble-promotion and -Wfloat-conversion for most ports to ban out implicit floating point conversions, and add extra Travis builds using MICROPY_FLOAT_IMPL_FLOAT to uncover warnings which weren't found previously. For the unix port -Wsign-comparison is added as well but only there since only clang supports this but gcc doesn't.
* unix: Fix behaviour of COPT/NDEBUG for unix variants.Jim Mussared2020-04-13
| | | | | | | | | | | | | | Based on eg 1e6fd9f2b4072873f5d6846b19b2ef0ccc5e4e52, it's understood that the intention for unix builds is that regular builds disable assert, but the coverage build should set -O0 and enable asserts. It looks like this didn't work (even before variants were introduced, eg at v1.11) -- coverage always built with -Os and -DNDEBUG. This commit makes it possible for variants to have finer-grained control over COPT flags, and enables assert() and -O0 on coverage builds. Other variants already match the defaults so they have been updated.
* ports: Enable error text compression for various ports, but not all.Jim Mussared2020-04-05
| | | | | | | | | | | | | | | | | | | Enabled on: bare-arm, minimal, unix coverage/dev/minimal, stm32, esp32, esp8266, cc3200, teensy, qemu-arm, nrf. Not enabled on others to be able to test the code when the feature is disabled (the default case). Code size change for this commit: bare-arm: -600 -0.906% minimal x86: -308 -0.208% unix x64: +0 +0.000% unix nanbox: +0 +0.000% stm32: -3368 -0.869% PYBV10 cc3200: -1024 -0.558% esp8266: -2512 -0.368% GENERIC esp32: -2876 -0.205% GENERIC[incl -3168(data)] nrf: -1708 -1.173% pca10040 samd: +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
* unix: Enable uasyncio C helper module on coverage build.Damien George2020-03-26
|
* unix: Remove custom file implementation to use extmod's VFS POSIX one.Damien George2020-03-18
| | | | | The implementation in extmod/vfs_posix_file.c is now equivalent to that in ports/unix/file.c, so remove the latter and use the former instead.
* py/modmicropython: Add heap_locked function to test state of heap.Andrew Leech2020-03-11
| | | | | | | | | | This commit adds micropython.heap_locked() which returns the current lock-depth of the heap, and can be used by Python code to check if the heap is locked or not. This new function is configured via MICROPY_PY_MICROPYTHON_HEAP_LOCKED and is disabled by default. This commit also changes the return value of micropython.heap_unlock() so it returns the current lock-depth as well.
* unix/Makefile: Reserve CFLAGS_EXTRA/LDFLAGS_EXTRA for external use.Damien George2020-01-24
| | | | | | | | | When CFLAGS_EXTRA/LDFLAGS_EXTRA (or anything) is set on the command line of a make invocation then it will completely override any setting or appending of these variables in the makefile(s). This means builds like the coverage variant will have their mpconfigvariant.mk settings overridden. Fix this by using CFLAGS/LDFLAGS exclusively in the makefile(s), reserving the CFLAGS_EXTRA/LDFLAGS_EXTRA variables for external command-line use only.
* lib/mp-readline: Add word-based move/delete EMACS key sequences.Yonatan Goldschmidt2020-01-12
| | | | | | | | | | | | This commit adds backward-word, backward-kill-word, forward-word, forward-kill-word sequences for the REPL, with bindings to Alt+F, Alt+B, Alt+D and Alt+Backspace respectively. It is disabled by default and can be enabled via MICROPY_REPL_EMACS_WORDS_MOVE. Further enabling MICROPY_REPL_EMACS_EXTRA_WORDS_MOVE adds extra bindings for these new sequences: Ctrl+Right, Ctrl+Left and Ctrl+W. The features are enabled on unix micropython-coverage and micropython-dev.
* unix: Rename unix binaries to micropython-variant (not _variant).Jim Mussared2020-01-12
| | | | For consistency with mpy-cross, and other unix tools in general.
* unix: Add build variants, analogous to boards on bare-metal.Jim Mussared2020-01-12
Invoking "make" will still build the standard "micropython" executable, but other variants are now build using, eg, "make VARIANT=minimal". This follows how bare-metal ports specify a particular board, and allows running any make target (eg clean, test) with any variant. Convenience targets (eg "make coverage") are provided to retain the old behaviour, at least for now. See issue #3043.