mem: Minor refactor of how the abstract mem backdoor is exposed.
[gem5.git] / tests / main.py
1 #!/usr/bin/env python
2 '''
3 The main source for testlib. Ties together the default test runners and
4 loaders.
5
6 Discovers and runs all tests from a given root directory.
7 '''
8 from __future__ import print_function
9
10 import sys
11 import os
12
13 os.environ["PYTHONUNBUFFERED"] = "1"
14
15 base_dir = os.path.dirname(os.path.abspath(__file__))
16 ext_path = os.path.join(base_dir, os.pardir, 'ext')
17
18 sys.path.insert(0, base_dir)
19 sys.path.insert(0, ext_path)
20
21 import testlib.main as testlib
22 import testlib.configuration as config
23 import testlib.helper as helper
24
25 config.basedir = helper.absdirpath(__file__)
26 sys.exit(testlib())