mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +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
ae1395de18
commit
1fdff7c7a6
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue