test.py revision 9792
16145Snate@binkert.org# Copyright (c) 2006-2007 The Regents of The University of Michigan
26145Snate@binkert.org# All rights reserved.
36145Snate@binkert.org#
46145Snate@binkert.org# Redistribution and use in source and binary forms, with or without
56145Snate@binkert.org# modification, are permitted provided that the following conditions are
66145Snate@binkert.org# met: redistributions of source code must retain the above copyright
76145Snate@binkert.org# notice, this list of conditions and the following disclaimer;
86145Snate@binkert.org# redistributions in binary form must reproduce the above copyright
96145Snate@binkert.org# notice, this list of conditions and the following disclaimer in the
106145Snate@binkert.org# documentation and/or other materials provided with the distribution;
116145Snate@binkert.org# neither the name of the copyright holders nor the names of its
126145Snate@binkert.org# contributors may be used to endorse or promote products derived from
136145Snate@binkert.org# this software without specific prior written permission.
146145Snate@binkert.org#
156145Snate@binkert.org# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
166145Snate@binkert.org# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
176145Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
186145Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
196145Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
206145Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
216145Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
226145Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
236145Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
246145Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
256145Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
266145Snate@binkert.org#
276145Snate@binkert.org# Authors: Korey Sewell
286145Snate@binkert.org
296145Snate@binkert.orgm5.util.addToPath('../configs/common')
307054Snate@binkert.orgfrom cpu2000 import twolf
317054Snate@binkert.orgimport os
327054Snate@binkert.org
337054Snate@binkert.orgworkload = twolf(isa, opsys, 'smred')
346145Snate@binkert.orgroot.system.cpu[0].workload = workload.makeLiveProcess()
356145Snate@binkert.orgcwd = root.system.cpu[0].workload[0].cwd
367054Snate@binkert.org
377054Snate@binkert.org#Remove two files who's presence or absence affects execution
386145Snate@binkert.orgsav_file = os.path.join(cwd, workload.input_set + '.sav')
397002Snate@binkert.orgsv2_file = os.path.join(cwd, workload.input_set + '.sv2')
408229Snate@binkert.orgtry:
417454Snate@binkert.org    os.unlink(sav_file)
427002Snate@binkert.orgexcept:
436154Snate@binkert.org    print "Couldn't unlink ", sav_file
446145Snate@binkert.orgtry:
456145Snate@binkert.org    os.unlink(sv2_file)
466145Snate@binkert.orgexcept:
476145Snate@binkert.org    print "Couldn't unlink ", sv2_file
489274Snilay@cs.wisc.edu