mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-21 17:37:39 +00:00
zdtm: fix check for criu binary
The opts['action'] contains actor function and not the action name, so we should compare it with a function. While on it let's also add a comment about --criu-bin option if CRIU binary is missing. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
parent
2da6a6faff
commit
0d15e2f4d9
@ -1611,6 +1611,7 @@ class criu:
|
||||
def available():
|
||||
if not os.access(opts['criu_bin'], os.X_OK):
|
||||
print("CRIU binary not found at %s" % opts['criu_bin'])
|
||||
print("Consider building CRIU or using '--criu-bin' option.")
|
||||
sys.exit(1)
|
||||
|
||||
def kill(self):
|
||||
@ -2972,7 +2973,7 @@ if __name__ == '__main__':
|
||||
if opts['debug']:
|
||||
sys.settrace(traceit)
|
||||
|
||||
if opts['action'] == 'run':
|
||||
if opts['action'] == run_tests:
|
||||
criu.available()
|
||||
for tst in test_classes.values():
|
||||
tst.available()
|
||||
|
Loading…
x
Reference in New Issue
Block a user