diff options
Diffstat (limited to 'final/testsuite/adding_xfails.py')
-rwxr-xr-x | final/testsuite/adding_xfails.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/final/testsuite/adding_xfails.py b/final/testsuite/adding_xfails.py new file mode 100755 index 0000000..2ad48d9 --- /dev/null +++ b/final/testsuite/adding_xfails.py @@ -0,0 +1,32 @@ + +import os +import commands + +perl = "/usr/bin/perl" +LLVM = "./LLVM-IR/" +temp_filename = "temp" +XFAIL_text = "; XFAIL: *\n" + + +arch_file_list = dict() +arch_file_list['lin_32e'] = ['test_omp_task_final.ll', 'test_omp_task_untied.ll'] + + +arch_script = "../runtime/tools/check-openmp-test.pl" +arch_cmd = perl + " " + arch_script +arch = commands.getoutput(arch_cmd) +arch = arch[:len(arch)-1] + +print "Adding XFAILS ..." + +for f in arch_file_list[arch]: + filename = LLVM + arch + "/" + f + lines = open(filename).readlines() + lines.insert(1, XFAIL_text) + f2 = open(temp_filename, "w") + for l in lines: + f2.write(l) + f2.close() + + os.system("mv " + temp_filename + " " + filename) + |