Merge with head.
[gem5.git] / tests / long / 70.twolf / test.py
index be7a04f974f8403c47447e19b3d0b337069e8118..85b106eb4e505084cff269ad70482484429bbbed 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (c) 2006 The Regents of The University of Michigan
+# Copyright (c) 2006-2007 The Regents of The University of Michigan
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 #
 # Authors: Korey Sewell
 
-process = LiveProcess(executable = binpath('twolf'))
-process.cmd = 'twolf' + inputpath('twolf', 'smred/smred')
-root.system.cpu.workload = process
+m5.AddToPath('../configs/common')
+from cpu2000 import twolf
+import os
+
+workload = twolf(isa, opsys, 'smred')
+root.system.cpu.workload = workload.makeLiveProcess()
+cwd = root.system.cpu.workload[0].cwd
+
+#Remove two files who's presence or absence affects execution
+sav_file = os.path.join(cwd, workload.input_set + '.sav')
+sv2_file = os.path.join(cwd, workload.input_set + '.sv2')
+try:
+    os.unlink(sav_file)
+except:
+    print "Couldn't unlink ", sav_file
+try:
+    os.unlink(sv2_file)
+except:
+    print "Couldn't unlink ", sv2_file