test.py revision 4199
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.AddToPath('../configs/common') 306145Snate@binkert.orgfrom cpu2000 import twolf 316145Snate@binkert.orgimport os 326145Snate@binkert.org 336154Snate@binkert.orgworkload = twolf('alpha', 'tru64', 'smred') 346285Snate@binkert.orgroot.system.cpu.workload = workload.makeLiveProcess() 356154Snate@binkert.orgcwd = root.system.cpu.workload.cwd 366145Snate@binkert.org 376145Snate@binkert.org#Remove two files who's presence or absence affects execution 386285Snate@binkert.orgsav_file = os.path.join(cwd, workload.input_set + '.sav') 396145Snate@binkert.orgsv2_file = os.path.join(cwd, workload.input_set + '.sv2') 406285Snate@binkert.orgtry: 416285Snate@binkert.org os.unlink(sav_file) 426285Snate@binkert.orgexcept: 436285Snate@binkert.org print "Couldn't unlink ", sav_file 446285Snate@binkert.orgtry: 456285Snate@binkert.org os.unlink(sv2_file) 466145Snate@binkert.orgexcept: 476145Snate@binkert.org print "Couldn't unlink ", sv2_file 486762SBrad.Beckmann@amd.com