9 proc = subprocess.Popen("ls *.jpg", shell=True,
10 stdout=subprocess.PIPE,
11 stderr=subprocess.PIPE)
12 test_files = proc.communicate()[0].split()
14 proc = subprocess.Popen("git log --pretty=format:'%h' -n 1", shell=True,
15 stdout=subprocess.PIPE,
16 stderr=subprocess.PIPE)
18 git_hash = proc.communicate()[0].strip()
20 res_name = "res" + datetime.datetime.now().strftime("%Y%m%d%H%M") + "-" + git_hash
26 if len(sys.argv) > 1 and sys.argv[1] == "debug":
27 args = ["-vds"] + args
29 args = ["../imago"] + args
32 print "testing file", fl, str(n) + "/" + str(len(test_files))
33 print " ".join(args + [fl])
36 proc = subprocess.Popen(args + [fl],
37 stdout=subprocess.PIPE,
38 stderr=subprocess.PIPE)
39 [output, err] = proc.communicate()
40 r_code = proc.returncode
42 test_results.append((fl, t1 - t0, output, err, r_code))
44 pickle.dump(test_results, open(res_name, 'w'))
46 print "written file", res_name