changeset 3195e72010da in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=3195e72010da
description:
tests: check for gem5 binary before tests
Provides a helpful error when tests.py is invoked without the gem5
binary.
Before:
Running 0 tests
After:
gem5 binary 'quick/...' not an executable file
Change-Id: I1566802206c9e21ca89bd03e91db22844168a085
Reviewed-by: Andreas Sandberg <[email protected]>
diffstat:
tests/tests.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r 8ab6738c5f66 -r 3195e72010da tests/tests.py
--- a/tests/tests.py Tue Feb 14 15:09:18 2017 -0600
+++ b/tests/tests.py Tue Feb 14 15:09:18 2017 -0600
@@ -174,6 +174,11 @@
_add_format_args(parser)
def _run_tests(args):
+ if not os.path.isfile(args.gem5) or not os.access(args.gem5, os.X_OK):
+ print >> sys.stderr, \
+ "gem5 binary '%s' not an executable file" % args.gem5
+ sys.exit(2)
+
formatter = _create_formatter(args)
out_base = os.path.abspath(args.directory)
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev