summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2023-08-17 14:46:10 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2023-08-17 14:46:10 +0200
commit95ce31bfff1beebae8971a1bcdbff92cf929f15d (patch)
tree3fe7aa2ad06d38b1fcfd7ef4e108840d22f79ba1
parentd8bdfc71c77793425b7069855c1aa89a537d05a3 (diff)
parente677af4cb380e42b750a85f158fd33e491832489 (diff)
downloadrules-cc-95ce31bfff1beebae8971a1bcdbff92cf929f15d.tar.gz
Merge subtree 'rules' into rules-cc
-rw-r--r--rules/CC/auto/RULES7
-rw-r--r--rules/CC/auto/TARGETS1
-rwxr-xr-xrules/CC/auto/runner (renamed from rules/CC/auto/config_runner.py)0
-rw-r--r--rules/CC/test/RULES20
-rwxr-xr-xrules/CC/test/runner (renamed from rules/CC/test/test_runner.py)0
-rw-r--r--rules/shell/test/RULES14
-rwxr-xr-xrules/shell/test/runner (renamed from rules/shell/test/test_runner.sh)0
-rwxr-xr-xrules/shell/test/summarizer (renamed from rules/shell/test/test_summary.py)0
8 files changed, 36 insertions, 6 deletions
diff --git a/rules/CC/auto/RULES b/rules/CC/auto/RULES
index 0e156c9..860db01 100644
--- a/rules/CC/auto/RULES
+++ b/rules/CC/auto/RULES
@@ -1015,6 +1015,11 @@
, "target configuration. In the usual case, a target using this rule is"
, "configured by depending on it from a target that uses the built-in"
, "\"configure\" rule."
+ , ""
+ , "The actual generation of the header file from the template"
+ , "is done by the implicit dependency on the \"runner\" target which"
+ , "can be changed globally by setting this target in the"
+ , "target layer of this repository."
]
, "field_doc":
{ "output":
@@ -1045,7 +1050,7 @@
, "last": "last_list_entry"
, "stage_singleton_field": ["", "stage_singleton_field"]
}
- , "implicit": {"runner": ["config_runner.py"]}
+ , "implicit": {"runner": ["runner"]}
, "expression":
{ "type": "let*"
, "bindings":
diff --git a/rules/CC/auto/TARGETS b/rules/CC/auto/TARGETS
new file mode 100644
index 0000000..0967ef4
--- /dev/null
+++ b/rules/CC/auto/TARGETS
@@ -0,0 +1 @@
+{}
diff --git a/rules/CC/auto/config_runner.py b/rules/CC/auto/runner
index f938c27..f938c27 100755
--- a/rules/CC/auto/config_runner.py
+++ b/rules/CC/auto/runner
diff --git a/rules/CC/test/RULES b/rules/CC/test/RULES
index a1f4bfb..08c058c 100644
--- a/rules/CC/test/RULES
+++ b/rules/CC/test/RULES
@@ -32,8 +32,8 @@
]
, "implicit":
{ "defaults": [["./", "..", "defaults"]]
- , "runner": ["test_runner.py"]
- , "summarizer": [["./", "../../shell/test", "test_summary.py"]]
+ , "runner": ["runner"]
+ , "summarizer": [["./", "../../shell/test", "summarizer"]]
}
, "field_doc":
{ "name":
@@ -42,7 +42,18 @@
, "Used to name the test binary as well as for staging the test result"
]
, "args": ["Command line arguments for the test binary"]
- , "srcs": ["The sources of the test binary"]
+ , "srcs":
+ [ "The sources of the test binary"
+ , ""
+ , "The resulting test binary in an environment where it can assume"
+ , "that the environment variable TEST_TMPDIR points to a"
+ , "director that may be used exclusively by this test."
+ , ""
+ , "This running of the test is carried out by the implicit dependency"
+ , "on the target \"runner\". By setting this target in the target layer"
+ , "of this rues repository (instead of letting it default to the"
+ , "respective file), the C/C++ test environment can be modified globally."
+ ]
, "private-hdrs":
[ "Any additional header files that need to be present when compiling"
, "the test binary."
@@ -100,6 +111,9 @@
, "RUNS_PER_TEST":
[ "The number of times the test should be run in order to detect flakyness."
, "If set, no test action will be taken from cache."
+ , ""
+ , "Test runs are summarized by the [\"shell/test\", \"summarizer\"] that"
+ , "is also used by shell tests."
]
, "TARGET_ARCH":
[ "The architecture to build the test for."
diff --git a/rules/CC/test/test_runner.py b/rules/CC/test/runner
index 0647621..0647621 100755
--- a/rules/CC/test/test_runner.py
+++ b/rules/CC/test/runner
diff --git a/rules/shell/test/RULES b/rules/shell/test/RULES
index b3d757a..25d2493 100644
--- a/rules/shell/test/RULES
+++ b/rules/shell/test/RULES
@@ -24,6 +24,11 @@
, "If the configuration variable RUNS_PER_TEST is set, the environment"
, "variable TEST_RUN_NUMBER will also be set to the number of the attempt,"
, "counting from 0."
+ , ""
+ , "This running of the test is carried out by the implicit dependency"
+ , "on the target \"runner\". By setting this target in the target layer"
+ , "of this rues repository (instead of letting it default to the"
+ , "respective file), the shell test environment can be modified globally."
]
, "name":
[ "A name for the test, used in reporting, as well as for staging"
@@ -43,6 +48,12 @@
{ "RUNS_PER_TEST":
[ "The number of times the test should be run in order to detect flakyness."
, "If set, no test action will be taken from cache."
+ , ""
+ , "The individual test runs will be summarized by the implict dependency"
+ , "on the target \"summarizer\". By setting this target in the target"
+ , "in the target layer of this rues repository (instead of letting it"
+ , "default to the respective file) the layout of the summary can be"
+ , "changed globally."
]
, "TEST_ENV": ["Additional environment for executing the test runner."]
, "TIMEOUT_SCALE":
@@ -76,8 +87,7 @@
, "As the built-in \"install\" rule only takes the runfiles of its \"deps\""
, "argument, this gives an easy way of defining test suites."
]
- , "implicit":
- {"runner": ["test_runner.sh"], "summarizer": ["test_summary.py"]}
+ , "implicit": {"runner": ["runner"], "summarizer": ["summarizer"]}
, "imports":
{ "test-result": "test-result"
, "action": "test-action"
diff --git a/rules/shell/test/test_runner.sh b/rules/shell/test/runner
index 97c75ef..97c75ef 100755
--- a/rules/shell/test/test_runner.sh
+++ b/rules/shell/test/runner
diff --git a/rules/shell/test/test_summary.py b/rules/shell/test/summarizer
index 0b5e656..0b5e656 100755
--- a/rules/shell/test/test_summary.py
+++ b/rules/shell/test/summarizer