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

Add GetTestNameForDB Method #10000

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mrambacher
Copy link
Contributor

Add a method that allows the test name to be part of the DB name. This makes it easier to associate a given test run with a given test. Otherwise, some of the tests will overwrite the old data from a previous test.

Add a method that allows the test name to be part of the DB name.  This makes it easier to associate a given test run with a given test.  Otherwise, some of the tests will overwrite the old data from a previous test.
@siying
Copy link
Contributor

siying commented May 16, 2022

"Otherwise, some of the tests will overwrite the old data from a previous test"

When a test passes, test results are always erased. By default, even a test fails, the path is cleaned up, unless either with env variable KEEP_DB is set or --gtest_throw_on_failure is provided. In the latter case, I assume the test run will not continue and users would be able to see the path. Are you concerned that if a test fails in the middle and we continue running following tests and the test directory will be overwritten?

@mrambacher
Copy link
Contributor Author

"Otherwise, some of the tests will overwrite the old data from a previous test"

When a test passes, test results are always erased. By default, even a test fails, the path is cleaned up, unless either with env variable KEEP_DB is set or --gtest_throw_on_failure is provided. In the latter case, I assume the test run will not continue and users would be able to see the path. Are you concerned that if a test fails in the middle and we continue running following tests and the test directory will be overwritten?

As #9539 shows, test results are not always cleaned up after they are completed. Many of the tests are cleaned up by the make script and not the test themselves. Because the test directory is the same for all of the tests for a single file, KEEP_DB only works if you are specifying a single test.

This change does the following:

  • It allows you to quickly see which tests are not cleaning up after themselves (ala Clean up some of the files left after test runs #9539)
  • It would allow tests to be run in parallel for a single executable (as they do not share directories)
  • It better names directories so there is less chance of conflict between tests

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

Successfully merging this pull request may close these issues.

3 participants