-
Notifications
You must be signed in to change notification settings - Fork 8
/
runLZ
executable file
·42 lines (34 loc) · 1.06 KB
/
runLZ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/python
#
# run all tests
#
import os
import sys
import signal
import time
import subprocess
os.system("make clean;unset CILK;unset CILKP;make;")
def signal_handler(signal,frame):
print "bye\n"
sys.exit(0)
signal.signal(signal.SIGINT,signal_handler)
def shellGetOutput(str) :
process = subprocess.Popen(str,shell=True,stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
output, err = process.communicate()
if (len(err) > 0):
raise NameError(str+"\n"+output+err)
return output
#testfiles = []
testfiles = ["10Midentical","10Mrandom","10Msqrtn","chr22.dna","etext99","howto.txt","jdk13c","rctail96","rfc","sprot34.dat","thesaurus.doc","w3c2","wikisamp.xml","wikisamp9.xml"]
#testfiles = ["wikisamp9.xml"]
#testfiles = ["proteins","english"]
#testfiles = ["proteins"]
testfiles = ["pitches","proteins.200MB","sources"]
apps = ["lz77_1","lz77_2","lz77_3"]
for app in apps:
for testfile in testfiles :
ss = "./"+app+" -i testData/"+testfile
print app + " " + testfile
print shellGetOutput(ss)
sys.stdout.flush()