test: make the ParseableInterface.ModuleCache tests pass on Windows

Use a wrapper for invoking chmod a-r or icacls on Windows to make the
files actually unreadable.  This allows the tests to pass on Windows.
This commit is contained in:
Saleem Abdulrasool
2019-03-30 23:15:05 -07:00
parent f85ca6c01a
commit 7c078bf486
5 changed files with 34 additions and 4 deletions

View File

@@ -57,7 +57,7 @@
// RUN: %empty-directory(%t/MCP)
// 6. Both are present but the module can't be opened.
// RUN: chmod a-r %t/Lib.framework/Modules/Lib.swiftmodule/%target-swiftmodule-name
// RUN: %{python} %S/../Inputs/make-unreadable.py %t/Lib.framework/Modules/Lib.swiftmodule/%target-swiftmodule-name
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-parseable not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -F %t 2>&1 | %FileCheck -check-prefix=FROM-INTERFACE %s
// RUN: %empty-directory(%t/MCP)
// RUN: env SWIFT_FORCE_MODULE_LOADING=prefer-serialized not %target-swift-frontend -typecheck -parse-stdlib -module-cache-path %t/MCP %s -F %t 2>&1 | %FileCheck -check-prefix=NO-SUCH-MODULE %s