Commit Graph

25 Commits

Author SHA1 Message Date
Saleem Abdulrasool
8eaf6d55fc test: adjust the tests for swiftc-legacy-driver.exe
When enabling the early swift driver on Windows, these tests need to be
adjusted for the new driver name that is reported. Add an additional
spelling for the driver to accommodate that for the testsuite.
2024-12-02 11:50:57 -08:00
Butta
3933fc0006 [android][test] Fix several tests on the Android CI
- #58975 switched many tests from XFAIL on linux to linux-gnu, so seven
  fail on the Android CI and two natively. They are now explicitly excluded.
- #39605 added several C++ Interop tests, 11 of which fail on the Android CI,
  so disable them for now.
- #42478 removed the @noescape attribute for the non-Android
  SIL/clang-function-types tests, so I remove it for Android too.
- My pull #40779 moved the Swift pointer tags to the second byte, so
  SILOptimizer/concat_string_literals.64 will need to be updated for that,
  disabled it for now.
- Compiler-rt moved the directory in which it places those libraries for
  Android, llvm/llvm-project@a68ccba, so lit.cfg is updated for that.
2022-06-09 14:35:41 +05:30
Ben Barham
c163e0fe5e [Tests] Make OS features consistent
lit.py currently allows any substring of `target_triple` to be used as a
feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of
the OS spread across the tests and is also somewhat confusing since they
aren't actually listed in the available features.

Modify all OS-related features to use the `OS=` version that Swift adds
instead. We can later remove `config.target_triple` so that these don't
the non-OS versions don't work in the first place.
2022-05-20 19:51:23 -07:00
Alex Lorenz
2e3aa87737 Revert "Revert "Merge pull request #41831 from hyp/unify-header""
This reverts commit 4c9582c295.
2022-03-19 13:36:28 -07:00
Alex Lorenz
4c9582c295 Revert "Merge pull request #41831 from hyp/unify-header"
This reverts commit cd93d23bac, reversing
changes made to f9f5476e9a.
2022-03-18 10:03:07 -07:00
Alex Lorenz
9d52099d5b [cxx-interop] start to emitting a unified header file for a Swift module
This change removes the -emit-cxx-header option, and adds a new -emit-clang-header-path option instead. It's aliased to -emit-objc-header-path for now, but in the future, -emit-objc-header-path will alias to it. After this change Swift can start emitting a single header file that can be expose declarations to C, Objective-C, or C++. For now C++ interface is generated (for all public decls) only when -enable-cxx-interop flag is passed, but that behavior will change once  attribute is supported.
2022-03-17 10:34:47 -07:00
Doug Gregor
f71f6207b5 [CMake] Make swift-frontend the primary Swift binary.
Build swift-frontend as the primary Swift binary, and have
swift/swiftc/etc. symlink over to it. This is a step toward allowing
swift-driver to replace the swift and swiftc binaries.
2020-06-23 13:00:26 -07:00
3405691582
7b431b4ddb [test] Mark XFAIL tests for OpenBSD.
These tests are marked XFAIL or UNSUPPORTED because either the tests:
require libc annotation, require Mach-O support, don't recognize calls to
swift-autolink-extract, requires porting alongside Linux, or rely on simd
which is not present.

Additionally, explicit REQUIRES for tsan/asan/fuzzer are added to some
tests, since OpenBSD does not support these sanitizers or fuzzers, since
it's nicer to mark that with REQUIRES rather than XFAIL.
2020-06-10 18:57:19 -04:00
Daniel Rodríguez Troitiño
70b1d91315 [windows] Allow EXE and exe capitalizations in tests.
Clang 8 or 9 seems to have changed from EXE to exe. Allow both
capitalizations (which is not important in Windows) as a workaround.

Maybe in the future we can remove the uppercase option.
2019-10-03 11:09:03 -07:00
Xi Ge
6ec4fc8ade test: update driver tests 2019-09-24 13:52:17 -07:00
Saleem Abdulrasool
67475dced4 Driver: avoid linking against the C++ runtime
Use `clang` rather than `clang++` as the linker driver.  This ensures
that we do not force a C++ runtime on the general code.  This is fine
for now as C++ interop is not yet available for Swift.  This prevents
the accidental mix-and-match of various C++ runtimes.  This can cause
problems on platforms like android where `libstdc++` is an unsupported
runtime but is generally the default for Linux platforms.
2019-07-24 19:48:02 -07:00
Jason Mittertreiner
4e0b092fbe Fixing Driver tests on Windows (#20209) 2018-12-10 18:27:37 -08:00
Benjamin Herzog
ac10fb3462 [Driver] Added process information to emitted messages
When providing the -parseable-output flag to the swift compiler, it will provide json formatted messages about tasks that run.
I added some optional usage information in form of user time, system time and maxrss to the output. This can be used by other tools using the compiler to get some insights about time and memory usage.
Since the output does not longer match processes run (in batch mode), I also added a real_pid field so the client could reason about jobs that belong together if needed.

rdar://39798231
2018-05-25 13:12:57 -07:00
Jake Petroules
96c0083d02 [Driver] Provide executed command as an actual array (#15012)
This patch adds additional entries to the JSON command messages output
by the Swift compiler. It's now possible to get the command executable
("command_executable") and arguments ("command_arguments") as a single
string and array, respectively, rather than having to parse the
shell-escaped command line provided in the "command" key.

<rdar://problem/35701809>
2018-03-07 10:40:38 -08:00
John McCall
dda3a3827c [SR-3063] Suppress SIL transforms when merging modules. 2017-07-27 10:21:02 -04:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Davide Italiano
edfa8fe428 [FreeBSD] XFAIL some Driver tests as we do on Linux. 2016-03-01 19:37:59 +00:00
Graham Batty
83b4384fac Update test flags for linux failures and support.
Also removed the sdk 'feature' in favour of the more specific
objc_interop.

Swift SVN r24856
2015-01-30 21:31:48 +00:00
Graham Batty
83f27a8af7 Revert "Mark tests that don't pass on linux as XFAIL."
This reverts commit 2711ca86de7bf6a7885ccea24219a48a590b1e95.

Swift SVN r23577
2014-11-24 17:42:13 +00:00
Graham Batty
198402dcfe Mark tests that don't pass on linux as XFAIL.
Swift SVN r23573
2014-11-24 17:40:37 +00:00
Jordan Rose
f22fd8da7b [test] Disable GuardMalloc logging, and re-enable the tests that logging broke.
Thanks, Greg.

Swift SVN r22009
2014-09-17 06:10:21 +00:00
Jordan Rose
3af1873db1 [test] Add "XFAIL: gmalloc" where appropriate.
As a reminder, you can test with GuardMalloc by passing "--param gmalloc"
to lit.

All other tests pass under GuardMalloc. Hooray!

Swift SVN r21995
2014-09-16 23:12:17 +00:00
Jordan Rose
1d8c75ede1 [test] Fix driver tests to handle spaces in the path to Xcode.
Commands like 'ld' are picked up from the path, which can result in picking
the binaries inside Xcode.

Swift SVN r21749
2014-09-05 22:22:41 +00:00
Adrian Prantl
122f3bc6ba Relax (yet another) driver testcase to allow both bin/swift -frontend
and bin/swiftc -frontend.

Swift SVN r21688
2014-09-03 23:13:44 +00:00
Connor Wakamo
46d85a7b2b [driver] Implemented support for emitting parseable output.
When "-parseable-output" is passed to the driver, it will now emit output in a
parseable format. (This format is described in docs/DriverParseableOutput.rst,
which was added in a previous commit.)

This is achieved by adding four functions (one for each kind of message). These
are in a new swift::driver::parseable_output namespace, and given the right
parameters, will output the appropriate message in JSON to the given
llvm::raw_ostream. These functions are then called by
Compilation::performJobsInList:

  - "began" messages are emitted by the taskBegan callback
  - "finished" messages are emitted by the taskFinished callback
  - "signalled" messages are emitted by the taskSignalled callback
  - "skipped" messages are emitted by the handleCommandWhichDoesNotNeedToExecute
    lambda

(Note that "skipped" messages will not be emitted in practice, since the driver
does not yet support partial compilation.)

This fixes <rdar://problem/15958329>.

Swift SVN r20873
2014-08-01 01:15:43 +00:00