mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
create userland tests
Fix some more tabs. Parse the "Simulated exit code not 0!" string in gem5 and exit with the proper status
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import argparse
|
||||
import imp
|
||||
import os
|
||||
import sys
|
||||
|
||||
class _Argument:
|
||||
def __init__(
|
||||
@@ -193,6 +194,12 @@ class CliFunction:
|
||||
args = parser.parse_args(args=cli_args)
|
||||
return self(**vars(args))
|
||||
|
||||
def cli_exit(self, *args, **kwargs):
|
||||
'''
|
||||
Same as cli, but also exit the program with int(cli().
|
||||
'''
|
||||
sys.exit(int(self.cli(*args, **kwargs)))
|
||||
|
||||
@staticmethod
|
||||
def get_key(*args, **kwargs):
|
||||
return _Argument.get_key(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user