52bca95208
.. it needs to operate on a FILE* rather than FIL depending on the build. Note that this is comparing output to expected, not to cpython dotenv package. Because run-tests.py starts the CPython interpreter with the '-S' (skip site initialization) flag, pip-installed packages are not available for import inside a test file. Instead, the exp file is generated manually: ``` circuitpython/tests$ python3 circuitpython/dotenv_test.py > circuitpython/dotenv_test.py.exp ``` Unfortunately, the test fails on test e15: ```diff FAILURE /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py --- /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py.exp 2022-10-04 09:48:16.307703128 -0500 +++ /home/jepler/src/circuitpython/tests/results/circuitpython_dotenv_test.py.out 2022-10-04 09:48:16.307703128 -0500 @@ -14,7 +14,7 @@ line e13 e13value e14 None -e15 e15value +e15 None e16 # e17 def e18 #has a hash ```
67 lines
2.0 KiB
Makefile
67 lines
2.0 KiB
Makefile
PROG ?= micropython-coverage
|
|
|
|
# Disable optimisations and enable assert() on coverage builds.
|
|
DEBUG ?= 1
|
|
|
|
CFLAGS += \
|
|
-fprofile-arcs -ftest-coverage \
|
|
-Wformat -Wmissing-declarations -Wmissing-prototypes \
|
|
-Wold-style-definition -Wpointer-arith -Wshadow -Wuninitialized -Wunused-parameter \
|
|
-DMICROPY_UNIX_COVERAGE \
|
|
-DMODULE_CEXAMPLE_ENABLED=1 -DMODULE_CPPEXAMPLE_ENABLED=1
|
|
|
|
LDFLAGS += -fprofile-arcs -ftest-coverage
|
|
|
|
FROZEN_MANIFEST ?= $(VARIANT_DIR)/manifest.py
|
|
USER_C_MODULES = $(TOP)/examples/usercmodule
|
|
|
|
MICROPY_VFS_FAT = 1
|
|
MICROPY_VFS_LFS1 = 1
|
|
MICROPY_VFS_LFS2 = 1
|
|
|
|
SRC_QRIO := $(patsubst ../../%,%,$(wildcard ../../shared-bindings/qrio/*.c ../../shared-module/qrio/*.c ../../lib/quirc/lib/*.c))
|
|
SRC_C += $(SRC_QRIO)
|
|
|
|
CFLAGS += -DCIRCUITPY_QRIO=1
|
|
$(BUILD)/lib/quirc/lib/%.o: CFLAGS += -Wno-shadow -Wno-sign-compare -include shared-module/qrio/quirc_alloc.h
|
|
|
|
SRC_BITMAP := \
|
|
$(patsubst ../../%,%,$(wildcard ../../shared-bindings/gifio/*.c ../../shared-module/gifio/*.c)) \
|
|
shared/runtime/context_manager_helpers.c \
|
|
displayio_min.c \
|
|
shared-bindings/aesio/aes.c \
|
|
shared-bindings/aesio/__init__.c \
|
|
shared-bindings/bitmaptools/__init__.c \
|
|
shared-bindings/displayio/Bitmap.c \
|
|
shared-bindings/dotenv/__init__.c \
|
|
shared-bindings/rainbowio/__init__.c \
|
|
shared-bindings/traceback/__init__.c \
|
|
shared-bindings/util.c \
|
|
shared-bindings/zlib/__init__.c \
|
|
shared-module/aesio/aes.c \
|
|
shared-module/aesio/__init__.c \
|
|
shared-module/bitmaptools/__init__.c \
|
|
shared-module/displayio/area.c \
|
|
shared-module/displayio/Bitmap.c \
|
|
shared-module/displayio/ColorConverter.c \
|
|
shared-module/displayio/ColorConverter.c \
|
|
shared-module/dotenv/__init__.c \
|
|
shared-module/rainbowio/__init__.c \
|
|
shared-module/traceback/__init__.c \
|
|
shared-module/zlib/__init__.c \
|
|
|
|
SRC_C += $(SRC_BITMAP)
|
|
|
|
CFLAGS += \
|
|
-DCIRCUITPY_AESIO=1 \
|
|
-DCIRCUITPY_BITMAPTOOLS=1 \
|
|
-DCIRCUITPY_DISPLAYIO_UNIX=1 \
|
|
-DCIRCUITPY_DOTENV=1 \
|
|
-DCIRCUITPY_GIFIO=1 \
|
|
-DCIRCUITPY_RAINBOWIO=1 \
|
|
-DCIRCUITPY_TRACEBACK=1 \
|
|
-DCIRCUITPY_ZLIB=1
|
|
|
|
SRC_C += coverage.c
|
|
SRC_CXX += coveragecpp.cpp
|