summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Dunham <Curtis.Dunham@arm.com>2017-02-14 15:09:18 -0600
committerCurtis Dunham <Curtis.Dunham@arm.com>2017-02-14 15:09:18 -0600
commit94e612665020d49e6cba659536e315be8ef1c71e (patch)
tree59a1014d95f716ec57fcd2e57777c827f193d13c
parent5638a074b9e493c0b4b2acc627072da5f3e41079 (diff)
downloadgem5-94e612665020d49e6cba659536e315be8ef1c71e.tar.xz
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 <andreas.sandberg@arm.com>
-rwxr-xr-xtests/tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/tests.py b/tests/tests.py
index 136c879aa..3f6ed0a7a 100755
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -174,6 +174,11 @@ def _run_tests_args(subparsers):
_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)