Ceedling
Ceedling copied to clipboard
"ceedling test:pattern" fails to find tests matching pattern
ceedling test:pattern
is meant to run any test matching a regular expression, but it doesn't seem to work for me at all.
Say that I have the following failing test (located under /test/test_pwmProfiling.c
), and I want to run it in isolation:
[test_pwmProfiling.c]
Test: test_PWM_Profile_Routines_Invokes_Entries_In_Order_Engine_Defines(RUN_TEST_NO_ARGS)
At line (211): "Memory Mismatch. Element 5 Byte 1 Expected 0x00 Was 0x32Cancelled profile routine"
I've tried the following:
$ ceedling test:pattern[Order_Engine_Defines]
Found no tests matching pattern /Order_Engine_Defines/.
$ ceedling test:pattern[.*Order_Engine_Defines.*]
Found no tests matching pattern /.*Order_Engine_Defines.*/.
$ ceedling test:pattern[.*Order.*]
Found no tests matching pattern /.*Order.*/.
$ ceedling test:pattern[Order]
Found no tests matching pattern /Order/.
ceedling test:pattern[.]
matches and runs all tests, as does ceedling test:pattern[test]
.
If I specify a pattern matching a test file name, it will execute the test file, but might not execute any tests within it:
$ ceedling test:pattern[.*relay.*]
Test 'test_relayControl.c'
--------------------------
--------------------
OVERALL TEST SUMMARY
--------------------
No tests executed.
Environment
I'm running these tests under Cygwin on Windows 10 x64 using the standard GNU toolchain.
$ gcc --version
gcc (GCC) 6.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ceedling version
Ceedling:: 0.28.2
CException:: 1.3.1.18
CMock:: 2.4.4.215
Unity:: 2.4.1.120
AFAIK test:pattern
isn't supposed to search for the names of test functions, but only test files.
As for not executing any tests, my guess would be that you didn't change anything in that file (or other .c
files it depends on) since the last time you ran it, and test:pattern
only runs files that have been changed (just like test:delta
).
Hi @TAGC ,
I think you might look at master or near release v0.32 of Ceedling. After updating your project.yml with:
:test_runner:
:cmdline_args: true
you will be able to run single test or multiple of them. Feel free to look at description of PR(https://github.com/ThrowTheSwitch/Ceedling/pull/736) under section How it works in real life.
Please let me know if this solve your problem. If yes, do you think that we can close this topic?