blob: 2ad48d93440b4ea95a5a3cf0aa58414f6f56a42d [file] [log] [blame]
Andrey Churbanova951e212015-04-29 14:36:38 +00001
2import os
3import commands
4
5perl = "/usr/bin/perl"
6LLVM = "./LLVM-IR/"
7temp_filename = "temp"
8XFAIL_text = "; XFAIL: *\n"
9
10
11arch_file_list = dict()
12arch_file_list['lin_32e'] = ['test_omp_task_final.ll', 'test_omp_task_untied.ll']
13
14
15arch_script = "../runtime/tools/check-openmp-test.pl"
16arch_cmd = perl + " " + arch_script
17arch = commands.getoutput(arch_cmd)
18arch = arch[:len(arch)-1]
19
20print "Adding XFAILS ..."
21
22for f in arch_file_list[arch]:
23 filename = LLVM + arch + "/" + f
24 lines = open(filename).readlines()
25 lines.insert(1, XFAIL_text)
26 f2 = open(temp_filename, "w")
27 for l in lines:
28 f2.write(l)
29 f2.close()
30
31 os.system("mv " + temp_filename + " " + filename)
32