Commit Graph

13 Commits

Author SHA1 Message Date
Doug Gregor
69ab4fc56c Use LLVM diagnostic style for a number of Clang importer tests
These tests are checking the printed outpout of the diagnostic formatter
in ways that change with the Swift formatter, but are not consequential.
2024-02-19 02:48:36 -10:00
Doug Gregor
c24d262609 Update tests 2023-02-01 12:58:54 -08:00
Ben Barham
28bb2505b0 [ClangImporter] Respect -working-directory in the created VFS
Pass a wrapped VFS down into `clang::createInvocationFromCommandLine` so
that the working directory is set and then used in the underlying Clang
`CompilerInstance`.

Fixes the possibility of differing modules hashes when the same
arguments are used in Clang directly vs from the importer.

Resolves rdar://79376364
2021-06-24 11:07:40 +10:00
Saleem Abdulrasool
fd75ed7a29 tests: adjustments for Windows
Alter the path separators for Windows paths.  This makes 66% of the
remaining tests pass on Windows.
2019-02-17 13:55:52 -08:00
Saleem Abdulrasool
364a473ed3 test: normalize paths and check variant
Update the path separator checks to account for differences across
platforms.
2018-12-01 11:58:33 -08:00
Saleem Abdulrasool
7606e2b5c5 ClangImporter: improve ObjC-interop and enable tests
This enables additional tests for the ClangImporter.  This found a
missing piece in the `-enable-objc-interop` work that was done
previously.  Address that and enable the tests.  There are now the
following failing tests on Linux:

  * sdk - depends on Foundation (not hermetic, see SR-7572)
  * mixed-nsuinteger - depends on Foundation (not hermetic, see SR-7572)
  * import-mixed-with-header-twice - requires apple/swift PR#16022
  * can_import_objc_idempotent - requires apple/swift PR#16022
  * objc_protocol_renaming - requires apple/swift PR#16022
2018-05-01 18:39:42 -07:00
Adrian Prantl
97f9e4e367 Don't pass -Werror to ClangImporter's clang when Swift is used from within LLDB.
This works a around search path problems caused by a module existing
in both the build/install directory and the source directory.

<rdar://problem/35714074>
2017-12-06 09:22:29 -08:00
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
David Rönnqvist
d7c1f57184 Conditional checks using %target-runtime instead of %target-os 2017-03-16 13:10:10 +01:00
David Rönnqvist
9ae6fdacb3 Change Linux specific check to linux-gnu
When swift-ci ran the tests, it looks like `%target-os` was "linux-gnu”, which wasn’t listed in the Testing Swift document (ony listing `macosx`, `darwin`, `linux`, `freebsd`, `windows-cygnus`, and `windows-gnu`)

Since I can’t (at least don’t know how to) run the linux tests myself, I’ll try and update the check-prefix to see if that passes.
2017-03-16 11:42:42 +01:00
David Ronnqvist
56c1e2310e [SR-2409] Rephrase diagnostic to consider Objective-C interop
When Objective-C interop is enabled, modules will continue to be referred to as “Objective-C modules”. But when interop is disabled, they will be referred to as “C modules”.

Updated the existing test for the current behavior that doesn’t expect to fail on linux and doesn’t require objc_interop, so that it checks to different diagnostics on the two systems.
2017-03-16 07:48:49 +01:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Jordan Rose
61798ff6ec [test] Rename test/ClangModules to test/ClangImporter. (#5618)
...to match the component in include/ and lib/. No content change.
2016-11-02 18:00:53 -07:00