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

codeql run test doesn't match absolute fs paths in graph queries #36

Open
smowton opened this issue Jun 17, 2020 · 3 comments
Open

codeql run test doesn't match absolute fs paths in graph queries #36

smowton opened this issue Jun 17, 2020 · 3 comments
Labels
CLI

Comments

@smowton
Copy link

@smowton smowton commented Jun 17, 2020

Per @max-schaefer codeql run test should adapt queries that emit absolute FS paths such that they pass when run in a different environment. For example my test emits # 0| [File] /home/chris/codeql-home/codeql-go/ql/test/library-tests/semmle/go/PrintAst/input.go but the test doesn't work when the .expected file uses a truncated relative version of that path, or when it uses a different absolute path and the .actual uses the absolute path appropriate to a different environment.

@max-schaefer
Copy link

@max-schaefer max-schaefer commented Jun 17, 2020

To clarify: codeql run test does this already, but it doesn't seem to work reliably (or at all?) for graph queries.

@smowton smowton changed the title codeql run test doesn't match absolute fs paths codeql run test doesn't match absolute fs paths in graph queries Jun 17, 2020
@hmakholm
Copy link
Contributor

@hmakholm hmakholm commented Jun 23, 2020

The results comparison for graph queries is not entirely straightforward, and I'm not sure I fully understand the subtleties it has to deal with. @dbartol, do you have a clear enough understanding of the problem here to figure out what would be involved in solving it?

@alexet
Copy link

@alexet alexet commented Jun 23, 2020

I think the difference is that we only replace the location in graph queries, but we replace all strings with the file location in normal queries.

@adityasharad adityasharad added the CLI label Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.