From 07ce662bd212246e20d85de1e4f3d537565449d1 Mon Sep 17 00:00:00 2001 From: Sean Wilson Date: Thu, 3 Aug 2017 11:28:49 -0500 Subject: tests,ext: Add a new testing library proposal The new test library is split into two parts: The framework which resides in ext/, and the gem5 helping components in /tests/gem5. Change-Id: Ib4f3ae8d7eb96a7306335a3e739b7e8041aa99b9 Signed-off-by: Sean Wilson Reviewed-on: https://gem5-review.googlesource.com/4421 Reviewed-by: Giacomo Travaglini Maintainer: Jason Lowe-Power --- tests/main.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 tests/main.py (limited to 'tests/main.py') diff --git a/tests/main.py b/tests/main.py new file mode 100755 index 000000000..c8dc9b961 --- /dev/null +++ b/tests/main.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python2 +''' +The main source for testlib. Ties together the default test runners and +loaders. + +Discovers and runs all tests from a given root directory. +''' +from __future__ import print_function + +import sys +import os + +base_dir = os.path.dirname(os.path.abspath(__name__)) +ext_path = os.path.join(base_dir, os.pardir, 'ext') + +sys.path.insert(0, base_dir) +sys.path.insert(0, ext_path) + +import testlib.main as testlib +import testlib.config as config +import testlib.helper as helper + +config.basedir = helper.absdirpath(__file__) +testlib() -- cgit v1.2.3