summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2009-03-07 16:58:51 -0800
committerSteve Reinhardt <steve.reinhardt@amd.com>2009-03-07 16:58:51 -0800
commit4f1855484c1fe148d66b2dbc2dc0d7964b578c5c (patch)
tree9b3d7740f195c3d11f3b3c26d77c0290ccf93f5b /src
parent5cf060576623f3681b497c46934fb4fe6f8853a6 (diff)
downloadgem5-4f1855484c1fe148d66b2dbc2dc0d7964b578c5c.tar.xz
Fix up regression execution to better handle tests that end abnormally.
E.g., mark aborts due to assertion failures as failed tests, but those that get killed by the user as needing to be rerun, etc.
Diffstat (limited to 'src')
-rw-r--r--src/python/m5/config.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/python/m5/config.py b/src/python/m5/config.py
index 7fb531a18..c28f6675a 100644
--- a/src/python/m5/config.py
+++ b/src/python/m5/config.py
@@ -29,10 +29,18 @@
import os
from os.path import isdir, isfile, join as joinpath
-homedir = os.environ['HOME']
-confdir = os.environ.get('M5_CONFIG', joinpath(homedir, '.m5'))
+
+confdir = os.environ.get('M5_CONFIG')
+
+if not confdir:
+ # HOME is not set when running regressions, due to use of scons
+ # Execute() function.
+ homedir = os.environ.get('HOME')
+ if homedir and isdir(joinpath(homedir, '.m5')):
+ confdir = joinpath(homedir, '.m5')
+
def get(name):
- if not isdir(confdir):
+ if not confdir:
return None
conffile = joinpath(confdir, name)
if not isfile(conffile):