Skip to content

Commit ca47296

Browse files
committed
contest: kunit: support waiting for loadavg
Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 6dab047 commit ca47296

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

contest/remote/kunit.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from core import NipaLifetime
1212
from lib import Fetcher, namify
13+
from lib import wait_loadavg
1314

1415

1516
"""
@@ -30,6 +31,8 @@
3031
patches_path=/root-path/to/patches/dir
3132
[www]
3233
url=https://url-to-reach-base-path
34+
[cfg]
35+
wait_loadavg=
3336
3437
3538
Expected:
@@ -141,6 +144,10 @@ def test(binfo, rinfo, config):
141144

142145
tree_path = config.get('local', 'tree_path')
143146

147+
load_tgt = config.getfloat("cfg", "wait_loadavg", fallback=None)
148+
if load_tgt:
149+
wait_loadavg(load_tgt)
150+
144151
process = subprocess.Popen(['./tools/testing/kunit/kunit.py', 'run', '--alltests', '--json', '--arch=x86_64'],
145152
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
146153
cwd=tree_path)

0 commit comments

Comments
 (0)