Index: test/Frontend/output-failures.c =================================================================== --- test/Frontend/output-failures.c +++ test/Frontend/output-failures.c @@ -1,4 +1,3 @@ -// RUN: not %clang_cc1 -emit-llvm -o %S/doesnotexist/somename %s 2> %t -// RUN: FileCheck -check-prefix=OUTPUTFAIL -input-file=%t %s +// RUN: not %clang_cc1 -emit-llvm -o %ROOT%/doesnotexist/somename %s 2>&1 | FileCheck -check-prefix=OUTPUTFAIL %s -// OUTPUTFAIL: error: unable to open output file '{{.*}}{{[/\\]}}test{{[/\\]}}Frontend{{[/\\]}}doesnotexist{{[/\\]}}somename': '{{[nN]}}o such file or directory' +// OUTPUTFAIL: error: unable to open output file '{{.*}}doesnotexist{{.}}somename': '{{[nN]}}o such file or directory' \ No newline at end of file Index: test/Frontend/stats-file.c =================================================================== --- test/Frontend/stats-file.c +++ test/Frontend/stats-file.c @@ -4,5 +4,5 @@ // ... here come some json values ... // CHECK: } -// RUN: %clang_cc1 -emit-llvm -o %t -stats-file=%S/doesnotexist/bla %s 2>&1 | FileCheck -check-prefix=OUTPUTFAIL %s +// RUN: %clang_cc1 -emit-llvm -o %t -stats-file=%ROOT%/doesnotexist/bla %s 2>&1 | FileCheck -check-prefix=OUTPUTFAIL %s // OUTPUTFAIL: warning: unable to open statistics output file '{{.*}}doesnotexist{{.}}bla': '{{[Nn]}}o such file or directory' Index: test/lit.cfg.py =================================================================== --- test/lit.cfg.py +++ test/lit.cfg.py @@ -49,6 +49,7 @@ config.substitutions.append(('%PATH%', config.environment['PATH'])) +config.substitutions.append(('%ROOT%', os.path.abspath(os.sep))) # For each occurrence of a clang tool name, replace it with the full path to # the build directory holding that tool. We explicitly specify the directories