test.py revision 6654
112904Sgabeblack@google.com# Copyright (c) 2006-2007 The Regents of The University of Michigan 212904Sgabeblack@google.com# All rights reserved. 312904Sgabeblack@google.com# 412904Sgabeblack@google.com# Redistribution and use in source and binary forms, with or without 512904Sgabeblack@google.com# modification, are permitted provided that the following conditions are 612904Sgabeblack@google.com# met: redistributions of source code must retain the above copyright 712904Sgabeblack@google.com# notice, this list of conditions and the following disclaimer; 812904Sgabeblack@google.com# redistributions in binary form must reproduce the above copyright 912904Sgabeblack@google.com# notice, this list of conditions and the following disclaimer in the 1012904Sgabeblack@google.com# documentation and/or other materials provided with the distribution; 1112904Sgabeblack@google.com# neither the name of the copyright holders nor the names of its 1212904Sgabeblack@google.com# contributors may be used to endorse or promote products derived from 1312904Sgabeblack@google.com# this software without specific prior written permission. 1412904Sgabeblack@google.com# 1512904Sgabeblack@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1612904Sgabeblack@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1712904Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1812904Sgabeblack@google.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1912904Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2012904Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2112904Sgabeblack@google.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2212904Sgabeblack@google.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2312904Sgabeblack@google.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2412904Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2512906Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2612906Sgabeblack@google.com# 2712906Sgabeblack@google.com# Authors: Korey Sewell 2812906Sgabeblack@google.com 2912906Sgabeblack@google.comm5.util.addToPath('../configs/common') 3012904Sgabeblack@google.comfrom cpu2000 import twolf 3112904Sgabeblack@google.comimport os 3212904Sgabeblack@google.com 33workload = twolf(isa, opsys, 'smred') 34root.system.cpu.workload = workload.makeLiveProcess() 35cwd = root.system.cpu.workload[0].cwd 36 37#Remove two files who's presence or absence affects execution 38sav_file = os.path.join(cwd, workload.input_set + '.sav') 39sv2_file = os.path.join(cwd, workload.input_set + '.sv2') 40try: 41 os.unlink(sav_file) 42except: 43 print "Couldn't unlink ", sav_file 44try: 45 os.unlink(sv2_file) 46except: 47 print "Couldn't unlink ", sv2_file 48