summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-04-29 11:09:53 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-04-29 12:13:58 +0200
commitca2c263b7286a8ec31c88bfa6d9227ecee7c6574 (patch)
tree5e06d14e5a4db4e7956d9757ad249df2ef06f3b7
parent7d04ed7fb11e5696ace5c62bfc0edd3a9701f4cd (diff)
downloadjustbuild-ca2c263b7286a8ec31c88bfa6d9227ecee7c6574.tar.gz
["CC/test", "test"]: support TIMEOUT_SCALE
... to allow test actions to have a larger time out, while not changing anything in the build actions (and hence being able to use cache hits from normal build of the library being tested).
-rw-r--r--rules/CC/test/EXPRESSIONS8
-rw-r--r--rules/CC/test/RULES3
2 files changed, 11 insertions, 0 deletions
diff --git a/rules/CC/test/EXPRESSIONS b/rules/CC/test/EXPRESSIONS
index 4207f8e1..368d53ed 100644
--- a/rules/CC/test/EXPRESSIONS
+++ b/rules/CC/test/EXPRESSIONS
@@ -18,6 +18,7 @@
, "ADD_CXXFLAGS"
, "ENV"
, "TEST_ENV"
+ , "TIMEOUT_SCALE"
, "CC_TEST_LAUNCHER"
, "RUNS_PER_TEST"
, "name"
@@ -177,6 +178,8 @@
, "$1":
["CC test ", {"type": "var", "name": "test-name"}, " failed"]
}
+ , "timeout scaling":
+ {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0}
, "execution properties":
{"type": "var", "name": "target properties"}
}
@@ -252,6 +255,11 @@
, ")"
]
}
+ , "timeout scaling":
+ { "type": "var"
+ , "name": "TIMEOUT_SCALE"
+ , "default": 1.0
+ }
, "execution properties":
{"type": "var", "name": "target properties"}
}
diff --git a/rules/CC/test/RULES b/rules/CC/test/RULES
index aa698275..850d242e 100644
--- a/rules/CC/test/RULES
+++ b/rules/CC/test/RULES
@@ -23,6 +23,7 @@
, "ADD_CXXFLAGS"
, "ENV"
, "TEST_ENV"
+ , "TIMEOUT_SCALE"
, "CC_TEST_LAUNCHER"
, "RUNS_PER_TEST"
, "ARCH_DISPATCH"
@@ -103,6 +104,8 @@
]
, "ENV": ["The environment for any action generated."]
, "TEST_ENV": ["The environment for executing the test runner."]
+ , "TIMEOUT_SCALE":
+ ["Factor on how to scale the timeout for this test. Defaults to 1.0."]
, "CC_TEST_LAUNCHER":
[ "List of strings representing the launcher that is prepend to the"
, "command line for running the test binary."