Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering by exact name doesn't work #20

Open
GibbOne opened this issue Mar 2, 2022 · 5 comments
Open

Filtering by exact name doesn't work #20

GibbOne opened this issue Mar 2, 2022 · 5 comments

Comments

@GibbOne
Copy link

GibbOne commented Mar 2, 2022

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.

@GibbOne
Copy link
Author

GibbOne commented Mar 2, 2022

I guess it's enough to change return value at this point.

image

Should it return 0?

@jasmcaus
Copy link
Owner

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.

@matu3ba
Copy link
Contributor

matu3ba commented Apr 10, 2022

@GibbOne Can you write a test case within tau to show the example to kickoff dog feeding?

@GibbOne
Copy link
Author

GibbOne commented Apr 14, 2022

@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...

@matu3ba
Copy link
Contributor

matu3ba commented Apr 21, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants