summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend
diff options
context:
space:
mode:
authorStella Stamenova <stilis@microsoft.com>2019-01-25 23:03:12 +0000
committerStella Stamenova <stilis@microsoft.com>2019-01-25 23:03:12 +0000
commited01f8cc43def054815e595f96a65c92a5051e12 (patch)
treed0f511999170c437b9af1d81ddbc50e5ffe10ac4 /clang/test/Frontend
parent4c85e72ad3288ea55f09924d73eb3c3f7aba8269 (diff)
downloadbcm5719-llvm-ed01f8cc43def054815e595f96a65c92a5051e12.tar.gz
bcm5719-llvm-ed01f8cc43def054815e595f96a65c92a5051e12.zip
Fixed frontend clang tests in windows read-only container
Summary: When mounting LLVM source into a windows container in read-only mode, certain tests fail. Ideally, we want all these tests to pass so that developers can mount the same source folder into multiple (windows) containers simultaneously, allowing them to build/test the same source code using various different configurations simultaneously. **Fix**: I've found that when attempting to open a file for writing on windows, if you don't have the correct permissions (trying to open a file for writing in a read-only folder), you get [Access is denied](https://support.microsoft.com/en-us/help/2623670/access-denied-or-other-errors-when-you-access-or-work-with-files-and-f). In llvm, we map this error message to a linux based error, see: https://github.com/llvm-mirror/llvm/blob/master/lib/Support/ErrorHandling.cpp This is why we see "Permission denied" in our output as opposed to the expected "No such file or directory", thus causing the tests to fail. I've changed the test locally to instead point to the root drive so that they can successfully bypass the Access is denied error when LLVM is mounted in as a read-only directory. This way, the test operate exactly the same, but we can get around the windows-complications of what error to expect in a read-only directory. Patch By: justice_adams Reviewers: rsmith, zturner, MatzeB, stella.stamenova Reviewed By: stella.stamenova Subscribers: ormris, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D50563 llvm-svn: 352252
Diffstat (limited to 'clang/test/Frontend')
-rw-r--r--clang/test/Frontend/output-failures.c4
-rw-r--r--clang/test/Frontend/stats-file.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Frontend/output-failures.c b/clang/test/Frontend/output-failures.c
index 362deb5e462..61f8a0d9e47 100644
--- a/clang/test/Frontend/output-failures.c
+++ b/clang/test/Frontend/output-failures.c
@@ -1,4 +1,4 @@
-// RUN: not %clang_cc1 -emit-llvm -o %S/doesnotexist/somename %s 2> %t
+// RUN: not %clang_cc1 -emit-llvm -o %T/doesnotexist/somename %s 2> %t
// RUN: FileCheck -check-prefix=OUTPUTFAIL -input-file=%t %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'
diff --git a/clang/test/Frontend/stats-file.c b/clang/test/Frontend/stats-file.c
index 1869eb3f76a..8b4ed194511 100644
--- a/clang/test/Frontend/stats-file.c
+++ b/clang/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=%T/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'
OpenPOWER on IntegriCloud