-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Just: improve structure, add language-tests + integration-tests recip…
…es for rust
- Loading branch information
Paolo Tranquilli
committed
Dec 12, 2024
1 parent
ee753c6
commit 066c6c3
Showing
8 changed files
with
77 additions
and
42 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'lib.just' | ||
|
||
@_build LANGUAGE: | ||
if [ -n "${SEMMLE_CODE:-}" ]; then \ | ||
cd $SEMMLE_CODE; ./build target/intree/codeql-{{ LANGUAGE }}; \ | ||
else \ | ||
just install {{ LANGUAGE }}; \ | ||
fi | ||
|
||
[group('build')] | ||
build LANGUAGE: (_build LANGUAGE) | ||
|
||
alias b := build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import 'lib.just' | ||
|
||
@_install LANGUAGE: | ||
cd {{ source_dir() }}; bazel run //{{ trim_end_match(LANGUAGE, '/') }}:install | ||
|
||
[group('build')] | ||
install LANGUAGE: (_install LANGUAGE) | ||
|
||
alias i := install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import 'impl.just' | ||
import? '../justfile' # internal repo just file, if present | ||
import 'build.just' | ||
import 'test.just' | ||
import 'install.just' | ||
import? 'local.just' | ||
|
||
mod rust | ||
|
||
@_default: | ||
{{ just_executable() }} --list | ||
{{ just_executable() }} --list --list-submodules |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import? '../semmle-code.just' # internal repo just file, if present | ||
|
||
set fallback | ||
set allow-duplicate-recipes | ||
set unstable |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,24 @@ | ||
import '../justfile' | ||
import '../build.just' | ||
import '../install.just' | ||
import '../test.just' | ||
|
||
@_default: generate (build "rust") | ||
|
||
[group('build')] | ||
install LANGUAGE='rust': (_install LANGUAGE) | ||
|
||
[group('build')] | ||
build LANGUAGE='rust': (_build LANGUAGE) | ||
|
||
[group('generate')] | ||
generate: | ||
bazel run @codeql//rust/codegen | ||
|
||
alias gen := generate | ||
alias g := generate | ||
|
||
[group('test')] | ||
integration-tests: (_integration_tests (source_dir() / 'ql/integration-tests')) | ||
|
||
[group('test')] | ||
language-tests: (_language_tests 'rust' (source_dir() / 'ql/test')) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import '../../justfile' | ||
import '../../../test.just' | ||
|
||
test *ARGS=".": (_run_integration_tests ARGS) | ||
[group('test')] | ||
test *ARGS=".": (_integration_tests ARGS) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/usr/bin/env just --justfile | ||
import '../../../test.just' | ||
|
||
import '../../justfile' | ||
|
||
test *ARGS=".": (_run_language_tests "rust" ARGS) | ||
[group('test')] | ||
test *ARGS=".": (_language_tests "rust" ARGS) |
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