Skip to content

Commit e7f2ac6

Browse files
redsun82Copilot
andcommitted
Just: implement the common verbs for each language
Each language declares its own test flags, consistency queries and build steps, so that `just test`, `just build` and friends do the right thing wherever they are run from. The flag sets are transcribed from the internal CI definitions they replace, so behaviour is unchanged. `unified` gets the same treatment as the other languages, including the consistency queries that were previously not run anywhere. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent c870c14 commit e7f2ac6

46 files changed

Lines changed: 355 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

actions/justfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '../lib.just'
2+
3+
[group('build')]
4+
build: (_build_dist "actions")
5+
6+
roots := [source_dir() / 'ql/test']
7+
8+
[group('test')]
9+
language-tests *EXTRA_ARGS: (_language_tests (roots ++ EXTRA_ARGS))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import "../../../lib.just"
2+
3+
[no-cd]
4+
test *ARGS=".": (_integration_test ARGS)

actions/ql/justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import "../../lib.just"
2+
3+
[no-cd]
4+
format *ARGS=".": (_format_ql ARGS)
5+
6+
consistency_queries := ""

actions/ql/test/justfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import "../justfile"
2+
3+
base_flags := []
4+
5+
all_checks := default_db_checks
6+
7+
[no-cd]
8+
test *ARGS=".": (_codeql_test "actions" (base_flags ++ prepend('--all-checks=', all_checks) ++ ARGS))

cpp/justfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import '../lib.just'
2+
import? '../../cpp-coding-standards.just'
3+
4+
[group('build')]
5+
build: (_build_dist "cpp")
6+
7+
roots := [source_dir() / 'ql/test', SEMMLE_CODE / 'semmlecode-cpp-tests']
8+
9+
[group('test')]
10+
language-tests *EXTRA_ARGS: (_language_tests (roots ++ EXTRA_ARGS))

cpp/ql/integration-tests/justfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import "../../../lib.just"
2+
3+
[no-cd]
4+
test *ARGS=".": (_integration_test ARGS)

cpp/ql/justfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import "../../lib.just"
2+
3+
[no-cd]
4+
format *ARGS=".": (_format_ql ARGS)
5+
6+
consistency_queries := source_dir() / "consistency-queries"

cpp/ql/test/justfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import "../justfile"
2+
3+
base_flags := ['--include-location-in-star']
4+
5+
all_checks := default_db_checks ++ ['--check-undefined-labels', '--check-unused-labels', '--consistency-queries=' + consistency_queries]
6+
7+
[no-cd]
8+
test *ARGS=".": (_codeql_test "cpp" (base_flags ++ prepend('--all-checks=', all_checks) ++ ARGS))

csharp/justfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import '../lib.just'
2+
3+
[group('build')]
4+
build: (_build_dist "csharp")
5+
6+
roots := [source_dir() / 'ql/test']
7+
8+
[group('test')]
9+
language-tests *EXTRA_ARGS: (_language_tests (roots ++ EXTRA_ARGS))
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import "../../../lib.just"
2+
3+
[no-cd]
4+
test *ARGS=".": (_integration_test ARGS)

0 commit comments

Comments
 (0)