Andrey Churbanov | a951e21 | 2015-04-29 14:36:38 +0000 | [diff] [blame] | 1 | |
| 2 | import os |
| 3 | import commands |
| 4 | |
| 5 | perl = "/usr/bin/perl" |
| 6 | LLVM = "./LLVM-IR/" |
| 7 | temp_filename = "temp" |
| 8 | XFAIL_text = "; XFAIL: *\n" |
| 9 | |
| 10 | |
| 11 | arch_file_list = dict() |
| 12 | arch_file_list['lin_32e'] = ['test_omp_task_final.ll', 'test_omp_task_untied.ll'] |
| 13 | |
| 14 | |
| 15 | arch_script = "../runtime/tools/check-openmp-test.pl" |
| 16 | arch_cmd = perl + " " + arch_script |
| 17 | arch = commands.getoutput(arch_cmd) |
| 18 | arch = arch[:len(arch)-1] |
| 19 | |
| 20 | print "Adding XFAILS ..." |
| 21 | |
| 22 | for 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 | |