Created
April 24, 2013 22:23
-
-
Save Taormina/5456107 to your computer and use it in GitHub Desktop.
A script that generates the validations for CS4290 Project 3 as quickly as possible. If a diff actually prints something, then that validation failed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, threading | |
class ThreadClass(threading.Thread): | |
def __init__(self, p, c): | |
super(ThreadClass, self).__init__() | |
self.p = p | |
self.c = c | |
def run(self): | |
trace_location = "traces/" + self.c + "proc_validation" | |
file_name = "validation/" + self.p + "_" + self.c | |
os.system("./sim_trace -t " + trace_location+ " -p" + self.p + " 2> " + file_name) | |
os.system("diff " + trace_location + "/"+ self.p + "_validation.txt " + file_name) | |
print file_name + " done!" | |
protocols = ["MI", "MSI", "MOSI", "MESI", "MOESI", "MOESIF"] | |
cores = ["4", "8", "16"] | |
os.system("rm validation/*;") | |
for p in protocols: | |
for c in cores: | |
t = ThreadClass(p, c) | |
t.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yay :) someone has too much free time on their hands :-P