Thanks, so using that syntax my tests compile but still only one test is listed as available to run.
To get specific, I have two components,
accelerometer-lis2dw and
battery-charger-bq24295, each containing a single unit test, plus a component named
i2c-helper which they both require. I can compile the unit tests individually as follows:
Code: Select all
MINGW32> make -C ${IDF_PATH}/tools/unit-test-app EXTRA_COMPONENT_DIRS="~/esp/test-project/components/battery-charger-bq24295 ~/esp/test-project/components/i2c-helper" TEST_COMPONENTS=battery-charger-bq24295
...or:
Code: Select all
MINGW32> make -C ${IDF_PATH}/tools/unit-test-app EXTRA_COMPONENT_DIRS="~/esp/test-project/components/accelerometer-lis2dw ~/esp/test-project/components/i2c-helper" TEST_COMPONENTS=accelerometer-lis2dw
...and when I run them on the target
make monitor shows a menu, in each case, with the single unit test for that component correctly listed.
However, if I do [showing the tools output as well as my command-lines this time]:
Code: Select all
MINGW32> make -C ${IDF_PATH}/tools/unit-test-app EXTRA_COMPONENT_DIRS="~/esp/test-project/components/accelerometer-lis2dw ~/esp/test-project/components/battery-charger-bq24295 ~/esp/test-project/components/i2c-helper" TEST_COMPONENTS="battery-charger-bq24295 accelerometer-lis2dw"
make: Entering directory '/home/rob/esp/esp-idf/tools/unit-test-app'
make[1]: Entering directory '/home/rob/esp/esp-idf/components/bootloader/subproject'
make[1]: Leaving directory '/home/rob/esp/esp-idf/components/bootloader/subproject'
make[1]: Entering directory '/home/rob/esp/esp-idf/tools/unit-test-app/build/accelerometer-lis2dw'
CC /home/rob/esp/esp-idf/tools/unit-test-app/build/accelerometer-lis2dw/lis2dw.o
AR /home/rob/esp/esp-idf/tools/unit-test-app/build/accelerometer-lis2dw/libaccelerometer-lis2dw.a
make[1]: Leaving directory '/home/rob/esp/esp-idf/tools/unit-test-app/build/accelerometer-lis2dw'
make[1]: Entering directory '/home/rob/esp/esp-idf/tools/unit-test-app/build/battery-charger-bq24295'
CC /home/rob/esp/esp-idf/tools/unit-test-app/build/battery-charger-bq24295/bq24295.o
AR /home/rob/esp/esp-idf/tools/unit-test-app/build/battery-charger-bq24295/libbattery-charger-bq24295.a
make[1]: Leaving directory '/home/rob/esp/esp-idf/tools/unit-test-app/build/battery-charger-bq24295'
LD /home/rob/esp/esp-idf/tools/unit-test-app/build/unit-test-app.elf
esptool.py v2.6-beta1
To flash all build output, run 'make flash' or:
python /home/rob/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM52 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 /home/rob/esp/esp-idf/tools/unit-test-app/build/bootloader/bootloader.bin 0x10000 /home/rob/esp/esp-idf/tools/unit-test-app/build/unit-test-app.bin 0x8000 /home/rob/esp/esp-idf/tools/unit-test-app/build/partition_table_unit_test_app.bin
make: Leaving directory '/home/rob/esp/esp-idf/tools/unit-test-app'
...and download that binary:
Code: Select all
MINGW32> python /home/rob/esp/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port COM52 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 /home/rob/esp/esp-idf/tools/unit-test-app/build/bootloader/bootloader.bin 0x10000 /home/rob/esp/esp-idf/tools/unit-test-app/build/unit-test-app.bin 0x8000 /home/rob/esp/esp-idf/tools/unit-test-app/build/partition_table_unit_test_app.bin
esptool.py v2.6-beta1
Serial port COM52
Connecting........__
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC:
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Compressed 19408 bytes to 11573...
Wrote 19408 bytes (11573 compressed) at 0x00001000 in 0.1 seconds (effective 1076.3 kbit/s)...
Hash of data verified.
Compressed 262720 bytes to 143611...
Wrote 262720 bytes (143611 compressed) at 0x00010000 in 4.5 seconds (effective 465.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 179...
Wrote 3072 bytes (179 compressed) at 0x00008000 in 0.0 seconds (effective 1532.3 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
...then when I run
make monitor, only the
accelerometer-lis2dw test shows up:
Code: Select all
MINGW32> make monitor
MONITOR
--- idf_monitor on COM52 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
...
Press ENTER to see the list of tests.
Here's the test menu, pick your combo:
(1) "initialisation_1" [accelerometer-lis2dw]
What am I doing wrong? The test files compile, the test case names are different, why aren't they both listed?
I've attached one of the test files:
test_bq24295.c is similar but the test case name is different (
TEST_CASE("initialisation", "[battery-charger-bq24295]")).