diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-05-30 17:17:59 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-05-31 14:14:25 +0200 |
commit | 181fa7f35b194089e5e5b9ab9d5632d9b1a25520 (patch) | |
tree | 14afc3dfe006552277203f9917f53624d898c321 /rules | |
parent | f98c6de79fdc21560d6c356afd2c474f6abe4f7d (diff) | |
download | justbuild-181fa7f35b194089e5e5b9ab9d5632d9b1a25520.tar.gz |
["test/shell", "script"] Support long-running tests
Diffstat (limited to 'rules')
-rw-r--r-- | rules/shell/test/EXPRESSIONS | 6 | ||||
-rw-r--r-- | rules/shell/test/RULES | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/rules/shell/test/EXPRESSIONS b/rules/shell/test/EXPRESSIONS index d9b1fbc1..3ab3605b 100644 --- a/rules/shell/test/EXPRESSIONS +++ b/rules/shell/test/EXPRESSIONS @@ -1,6 +1,7 @@ { "test-action": { "vars": [ "TEST_ENV" + , "TIMEOUT_SCALE" , "ATTEMPT" , "name" , "test.sh" @@ -132,6 +133,8 @@ { "type": "join" , "$1": ["shell test ", {"type": "var", "name": "name"}, " failed"] } + , "timeout scaling": + {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0} } , "else": { "type": "ACTION" @@ -151,6 +154,8 @@ , ")" ] } + , "timeout scaling": + {"type": "var", "name": "TIMEOUT_SCALE", "default": 1.0} } } } @@ -158,6 +163,7 @@ , "test-result": { "vars": [ "TEST_ENV" + , "TIMEOUT_SCALE" , "name" , "test.sh" , "keep" diff --git a/rules/shell/test/RULES b/rules/shell/test/RULES index 98bf27cb..d6baa9ca 100644 --- a/rules/shell/test/RULES +++ b/rules/shell/test/RULES @@ -2,7 +2,8 @@ { "doc": ["Shell test, given by a test script"] , "target_fields": ["deps", "test"] , "string_fields": ["keep", "name"] - , "config_vars": ["ARCH", "HOST_ARCH", "RUNS_PER_TEST", "TEST_ENV"] + , "config_vars": + ["ARCH", "HOST_ARCH", "RUNS_PER_TEST", "TEST_ENV", "TIMEOUT_SCALE"] , "field_doc": { "test": [ "The shell script for the test, launched with sh." @@ -33,6 +34,8 @@ , "If set, no test action will be taken from cache." ] , "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."] } , "tainted": ["test"] , "artifacts_doc": |