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:
Ciro Santilli 六四事件 法轮功
2019-01-22 00:00:00 +00:00
parent 780e9ceeb4
commit f2e73bac83
18 changed files with 183 additions and 67 deletions

View File

@@ -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)