File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
lib/pbio/platform/sim_hub Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -213,8 +213,11 @@ CFLAGS += -fsingle-precision-constant -Wdouble-promotion
213213endif # end embedded, begin common
214214
215215# Tune for Debugging or Optimization
216- ifeq ($(DEBUG ) , 1)
217- CFLAGS += -Og -ggdb
216+ ifeq ($(COVERAGE ) , 1)
217+ CFLAGS += --coverage -fprofile-arcs -ftest-coverage
218+ LDFLAGS += --coverage
219+ else ifeq ($(DEBUG), 1)
220+ CFLAGS += -O0 -ggdb
218221else ifeq ($(DEBUG), 2)
219222CFLAGS += -Os -DNDEBUG -flto=auto
220223else
Original file line number Diff line number Diff line change 1515#define PBDRV_CONFIG_BUTTON_TEST (1)
1616
1717#define PBDRV_CONFIG_CLOCK (1)
18- #ifdef PBDRV_CONFIG_CLOCK_CI
18+ #ifdef PBDRV_CONFIG_RUN_ON_CI
1919#define PBDRV_CONFIG_CLOCK_TEST (1)
2020#else
2121#define PBDRV_CONFIG_CLOCK_LINUX (1)
Original file line number Diff line number Diff line change @@ -11,14 +11,16 @@ if [[ $CI != "true" ]]; then
1111 NOT_CI=" true"
1212fi
1313
14+ : ${COVERAGE:= 1}
1415SCRIPT_DIR=$( readlink -f " $( dirname " $0 " ) " )
1516BRICK_DIR=" $SCRIPT_DIR /bricks/simhub"
1617MP_TEST_DIR=" $SCRIPT_DIR /micropython/tests"
1718PB_TEST_DIR=$" $SCRIPT_DIR /tests"
18- BUILD_DIR=" $BRICK_DIR /build${COVERAGE: +-coverage} "
19+ BUILD_DIR_NAME=" build${COVERAGE: +-coverage} "
20+ BUILD_DIR=" $BRICK_DIR /$BUILD_DIR_NAME "
1921PBIO_DIR=" $SCRIPT_DIR /lib/pbio"
2022
21- make -s -j $( nproc --all) -C " $BRICK_DIR " COPT=-DPBDRV_CONFIG_RUN_ON_CI
23+ make -s -j $( nproc --all) -C " $BRICK_DIR " BUILD= " $BUILD_DIR_NAME " COPT=-DPBDRV_CONFIG_RUN_ON_CI
2224
2325export MICROPY_MICROPYTHON=" $BUILD_DIR /firmware.elf"
2426
You can’t perform that action at this time.
0 commit comments