CodeQL: Open test as current database
Note: this issue is currently blocked, but adding it here so we know to work on it when the blocker is removed.
When a test fails, I can right-click on it and have the useful options to see or accept the difference. One other useful thing to do is to locate the test database on disk and set it as the current database so that I can run queries and quick-evaluations against it.
However, there are currently issues with database corruption when you run tests while the test database is open in codeql, so currently we don't want to make it easier to open the test data and hit this problem more often than they do currently until we fix that problem.
Comment from @tausbn:
On a whim, I tried renaming the database before importing it, and so far this seems to have none of those evaluation errors. Could this be a solution? Instead of sharing the database with the test, simply import a copy of it? I feel like it would certainly be better than what we have now. (We could even name the database "Snapshot of such and such test made at such and such time" to make more clear that this database is unaffected by changing the test files.)
A workaround is to do the following:
- Remove the
.testprojextension - Run the
codeql database cleanupcommand on the database - Import into vscode
However, there are currently issues with database corruption when you run tests while the test database is open in codeql, so currently we don't want to make it easier to open the test data and hit this problem more often than they do currently until we fix that problem.
Is that still relevant after #868?