-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Just test PoC #18273
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
Draft
redsun82
wants to merge
9
commits into
main
Choose a base branch
from
redsun82/just
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Just test PoC #18273
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a rough PoC showcasing [just](https://github.com/casey/just) as a builder/test runner. After installing `just` you can (in this PoC <language> can only be `rust`): * `just install <language>` to install a language pack in-tree `<language>` can be omitted if running from inside its directory. * `just build <language>` will build `target/intree/codeql-<language>` from the internal repository, if available, otherwise it will fall back to `install`. * `just test TESTS... FLAGS...` will run the provided tests, if they are of the same kind (integration or QL tests), passing FLAGS to the runner. For QL tests the appropriate `build <language>` is run. Notably, for QL tests this command works also if using `codeql` standalone from the internal repository (using `install` and `codeql` from `PATH`). If running from within a test directory, `TESTS` can be omitted and defaults to all tests in the current directory.
3d93b38
to
1d88e13
Compare
It was slightly more difficult than I thought, because of some limitations of just: * the variadic args story is not super solid when passing them around, because just only uses string values internally. There is a plan to switch that to string lists though, which would make this easier. * variables defined on the command line do not cross module boundaries, so `just print_test_roots=true rust integration-tests` cannot work. In the end, this works: ```bash # runs the tests just rust integration-tests # only prints roots JUST_PRINT_TEST_ROOTS=true just rust integration-tests ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rough PoC showcasing just as a builder/test runner.
After installing
just
you can (in this PoC<language>
can only berust
):just install <language>
to install a language pack in-tree<language>
can be omitted if running from inside its directory.just build <language>
will buildtarget/intree/codeql-<language>
from the internal repository, if available, otherwise it will fall back toinstall
.just test TESTS... FLAGS...
will run the provided tests, if they are of the same kind (integration or QL tests), passing FLAGS to the runner (flags with arguments are required to be passed as--flag=value
or-fvalue
, as one string). For QL tests the appropriatebuild <language>
is run. Notably, for QL tests this command works also if usingcodeql
standalone from the internal repository (usinginstall
andcodeql
fromPATH
). If running from within a test directory,TESTS
can be omitted and defaults to all tests in the current directory. Even thetest
recipe can be omitted, as it's the default.rust
is a just module, so you can also runjust rust ...
with some other goodiesb
,i
,t
aliasesExamples: