Skip to content

Prepare for codeql test:#2501

Merged
yo-h merged 3 commits intogithub:masterfrom
hmakholm:test-extractors
Dec 10, 2019
Merged

Prepare for codeql test:#2501
yo-h merged 3 commits intogithub:masterfrom
hmakholm:test-extractors

Conversation

@hmakholm
Copy link
Copy Markdown
Contributor

@hmakholm hmakholm commented Dec 7, 2019

Various changes to make the public unit tests compatible with the coming test-runner support in the CodeQL CLI:

Java, JavaScript: Add queries.xml file. This defines which extractor the codeql test runner will use to extract databases for the tests. In the future one will be able to write this information in qlpack.yml, but we can't do that immediately because the existing CodeQL tooling would refuse to parse a qlpack.yml that has the new field in it.

JavaScript: Adding a queries.xml file means that the normalization of file names in the test output changes even with the old QLTest, so there are a number of consequential updates of expected output files.

Python: Explicitly add a --lang=2 override to python2-specific tests. This ensures that the test driver does not need to depend on its own command-line options to know how to extract each test directory. (The new test driver will not, at least at first, be able to run the same test with either python2 or python3 depending on command-line settings. Since python2's end-of-life is fast approaching, this is probably an acceptable state of affairs going forward).

Henning Makholm added 3 commits December 7, 2019 02:38
The `queries.xml` file defines which extractor the `codeql test` runner will use
to extract databases for the tests. In the future one will be able to write this
information in `qlpack.yml`, but we can't do that immediately because the
_existing_ CodeQL tooling would refuse to parse a `qlpack.yml` that has the new
field in it.

Adding a queries.xml file means that the normalization of file names in the test
output changes even with the old QLTest, so there are a number of consequential
updates of expected output files.
The `queries.xml` file defines which extractor the `codeql test` runner will use
to extract databases for the tests. In the future one will be able to write this
information in `qlpack.yml`, but we can't do that immediately because the
_existing_ CodeQL tooling would  refuse to parse  a `qlpack.yml` that has
the new field in it.
This allows them to work with the `LegacyQltLanguage.PYTHON3` extraction recipe.
@hmakholm hmakholm requested review from a team as code owners December 7, 2019 01:46
Copy link
Copy Markdown
Contributor

@tausbn tausbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python LGTM

@yo-h yo-h merged commit 837b1e2 into github:master Dec 10, 2019
@hmakholm hmakholm deleted the test-extractors branch December 11, 2019 15:28
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

Successfully merging this pull request may close these issues.

4 participants