1#! /usr/bin/env python 2 3# Copyright (c) 2010 Advanced Micro Devices, Inc. 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 95 unchanged lines hidden (view full) --- 104expr = re.compile('cpt\.([0-9]*)') 105cpts = [] 106for dir in dirs: 107 match = expr.match(dir) 108 if match: 109 cpts.append(int(match.group(1))) 110 111cpts.sort() |
112 |
113# We test by loading checkpoint N, simulating to (and dumping at) 114# checkpoint N+1, then comparing the resulting checkpoint with the 115# original checkpoint N+1. Thus the number of tests we can run is one 116# less than tha number of checkpoints. 117for i in range(1, len(cpts)): 118 print '===> Running test %d of %d.' % (i, len(cpts)-1) 119 mydir = os.path.join(top_dir, 'test.%d' % i) 120 subprocess.call([m5_binary] + ['-red', mydir] + options + initial_args + --- 6 unchanged lines hidden (view full) --- 127 '%s/%s' % (cptdir, cpt_name), 128 '%s/%s' % (mydir, cpt_name)], stdout=diffout) 129 diffout.close() 130 # print out the diff 131 diffout = open(diff_name) 132 print diffout.read(), 133 diffout.close() 134 |
135 |