tau
tau copied to clipboard
Filtering by exact name doesn't work
It's not possible to use entire test name (TESTSUITE.TESTNAME) to run a single test by mean of "--filter" option. Anyway if I remove just last char from the test name, it works.
Hello @GibbOne ! Sorry. Github Notifications are a pain. I believe so. Haven't really tested the filtering functionality myself. Would you like to contribute? Please open a PR in that case.
@GibbOne Can you write a test case within tau
to show the example to kickoff dog feeding?
@jasmcaus I can' t fork this repo, so I'm not able to open a PR.
Anyway, @matu3ba, below a minimal test for this issue.
#include "stdbool.h"
TAU_NO_MAIN();
bool testExecuted = false;
TEST(TEST, NAME)
{
testExecuted = true;
}
int main()
{
char name[] = "main";
char arg1[] = "--filter=TEST.NAME";
char* argv[] = { name, arg1 };
tau_main(2, argv);
CHECK(testExecuted);
}
It works, maybe you can do better...
@jasmcaus Can you comment the Makefile such that it becomes more obvious how things should be ordered?
cmake:
cmake -S $(SOURCE_DIR) -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Debug -DTAU_BUILDINTERNALTESTS=On
cmake --build $(BUILD_DIR) --config Debug
echo ------------------ Running Target ------------------
cd build/bin/ ; ./TauInternalTests
.PHONY: cmake
runs only TauInternalTests
. Should other Cli tests also go there?
What is
script:
python3 script.py
.PHONY: script
and
test:
gcc test.c -o test.exe -I .
./test.exe
.PHONY: test
used for? script.py does nothing, because everything is commented and gcc test.c fails, because the path is wrong.