test.py revision 11851
14107SN/A# Copyright (c) 2006-2007 The Regents of The University of Michigan
23294SN/A# All rights reserved.
33294SN/A#
43294SN/A# Redistribution and use in source and binary forms, with or without
53294SN/A# modification, are permitted provided that the following conditions are
63294SN/A# met: redistributions of source code must retain the above copyright
73294SN/A# notice, this list of conditions and the following disclaimer;
83294SN/A# redistributions in binary form must reproduce the above copyright
93294SN/A# notice, this list of conditions and the following disclaimer in the
103294SN/A# documentation and/or other materials provided with the distribution;
113294SN/A# neither the name of the copyright holders nor the names of its
123294SN/A# contributors may be used to endorse or promote products derived from
133294SN/A# this software without specific prior written permission.
143294SN/A#
153294SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
163294SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
173294SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
183294SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
193294SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
203294SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
213294SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
223294SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
233294SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
243294SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
253294SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
263294SN/A#
273294SN/A# Authors: Korey Sewell
283294SN/A
296654SN/Am5.util.addToPath('../configs/common')
303671SN/Afrom cpu2000 import twolf
314107SN/Aimport os
323671SN/A
334227SN/Aworkload = twolf(isa, opsys, 'smred')
3411851Sbrandon.potter@amd.comroot.system.cpu[0].workload = workload.makeProcess()
359792SN/Acwd = root.system.cpu[0].workload[0].cwd
364107SN/A
374107SN/A#Remove two files who's presence or absence affects execution
384107SN/Asav_file = os.path.join(cwd, workload.input_set + '.sav')
394107SN/Asv2_file = os.path.join(cwd, workload.input_set + '.sv2')
404199SN/Atry:
414199SN/A    os.unlink(sav_file)
424199SN/Aexcept:
434199SN/A    print "Couldn't unlink ", sav_file
444199SN/Atry:
454199SN/A    os.unlink(sv2_file)
464199SN/Aexcept:
474199SN/A    print "Couldn't unlink ", sv2_file
48