Commit Graph

23 Commits

Author SHA1 Message Date
Jason Mittertreiner
4e0b092fbe Fixing Driver tests on Windows (#20209) 2018-12-10 18:27:37 -08:00
Graydon Hoare
0f26b9c12d [Driver] <rdar://43955209> Remove obsolete/fragile batch mode 'repartitioning' code. 2018-10-09 13:31:41 -07:00
Graydon Hoare
19b946a003 <rdar://43955209> Attempt yet again to make overlong-argv test less flaky.
The last attempted fix relied on the assumption that lit was emulating shell
glob-expansion semantics, which it turns out it does not: lit looks at any 'cd'
command on a RUN line and then applies the specified directory as an absolute
prefix when resolving any subsequent non-absolute globs on the command line.
I.e. it will interpret the second line of:

   RUN: touch /tmp/foo{1,2,3}.swift
   RUN: cd /tmp && echo foo*.swift

as

   RUN: cd /tmp && echo /tmp/foo1.swift /tmp/foo2.swift /tmp/foo3.swift

whereas sh interprets it as (and I wrote the last attempt relying on):

   RUN: cd /tmp && echo foo1.swift foo2.swift foo3.swift

This new attempt therefore bypasses lit entirely and just delegates to sh.
While it might not be the most tasteful choice, it does what we want and in the
process lets us use loops to construct our testcase.
2018-09-05 14:55:24 -07:00
Graydon Hoare
a2fb9991ce <rdar://42816290> Attempt to make overlong-argv test less flaky. 2018-08-09 15:38:28 -07:00
Graydon Hoare
d5a9f44e4a [BatchMode] <rdar://41271283> Limit memory pressure on large modules. 2018-07-30 17:26:31 -07:00
Jordan Rose
ae6645d808 [test] Move a slow Driver test to the validation suite (#18261) 2018-07-26 17:53:43 -07:00
Jordan Rose
51f6e9a7c4 [test] Tidy up newly-added clang_rt Driver tests to be a bit clearer
Per feedback from David U.
2018-07-11 15:09:53 -07:00
Jordan Rose
d4668833e0 [Driver] Only link to compiler_rt if present for the target platform
Tweak the tests to check this correctly.
2018-07-10 12:45:59 -07:00
Jordan Rose
64b3d88d93 [Driver] Always link compiler_rt on Darwin
Turns out it's needed for normal builtins that can appear in inlinable
functions, including Objective-C's @available. Clang always links it
unconditionally, so so should Swift.

Note that this does mean you have to build compiler_rt to get a
successful test run on Apple platforms. That was always true if you
wanted the sanitizer tests to work, though.

rdar://problem/41911599
2018-07-09 13:42:02 -07:00
Jordan Rose
63ec4e21fb Add a (tiny) test that adding "final" to a file rebuilds dependents
I can't see how we'd ever get this wrong at this point, but way back
in the early days of incremental builds we apparently managed to.
Adding a test just to close this out.

rdar://problem/23148987
2018-02-22 16:56:07 -08:00
Dmitri Gribenko
486cab447d tests: replace 'rm -rf %t && mkdir -p %t' with '%empty-directory(%t)'
These changes were made using a script.
2017-06-04 11:08:39 -07:00
Robert Widmann
5722984571 Rewrite flattening to be more effective with nested products 2017-05-02 16:09:24 -04:00
Robert Widmann
39494b2ba2 Rearrange test code for exhaustiveness 2017-04-28 02:06:39 -04:00
Dmitri Gribenko
55864d10cb Tests: use 'mkdir -p' 2016-09-02 21:36:45 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Jordan Rose
848b3eb6a3 [Driver] Make sure to rebuild dependents when a dirty file fails. (#3935)
Otherwise we get into a situation like this:

1. Change made to the interface of file A.swift that also causes an
   error in A.swift.
2. Fixing the error in A.swift does not affect A.swift's interface.
3. File B.swift that depends on A.swift is not rebuilt, since the most
   recent change to A.swift did not change its interface.

To fix this, mark downstream files as needing to be rebuilt even when
a compilation job fails with errors. Additionally, attempt to be extra
conservative when there's a crash.

rdar://problem/25405605
2016-08-02 19:07:29 -07:00
Dmitri Gribenko
a30f90c965 CMake: move tricky code from CMake to Python
Removing an abstraction boundary also allowed me to fix a bug where we
could not run long tests in optimized mode, which prevented us from
being able to mark executable tests as long.
2016-06-06 01:02:03 -07:00
Dmitri Gribenko
1ce495f5f1 Mark two expensive tests with long_test 2016-06-05 18:22:17 -07:00
Jordan Rose
ff373e901f [test] Fix validation-test/Driver/many-inputs.swift differently.
It turns out the problem was with the full length of the argument list
in characters (bytes), not just the /number/ of arguments. Defeat this
by using paths relative to the temporary directory we're using.

rdar://problem/25617239, hopefully for the last time.
2016-04-11 10:08:43 -07:00
Jordan Rose
76ab68bdeb [test] Remove testing code. 2016-04-08 17:06:01 -07:00
Jordan Rose
3a47e7cfec [test] Fix validation-test/Driver/many-inputs.swift harder.
We still need a valid SDK because we're making sure linking works too.

rdar://problem/25617239
2016-04-08 16:56:21 -07:00
Jordan Rose
f39273b2fd [test] Avoid use of 'xcrun' in validation-test/Driver/many-inputs.swift.
'xcrun' can also have problems with large numbers of parameters, and it's not
what we're testing here.

rdar://problem/25617239
2016-04-08 10:43:34 -07:00
Jordan Rose
ad945426a0 Teach the frontend about -filelist for input files.
With this, we're out of the business of passing large numbers of input
files on the command line to the frontend, which means we no longer
overflow argv with a mere 1100 input files under whole-module optimization.

In order to make sure this doesn't happen again, I'd like to also get
this working for
- swiftmodule inputs to the merge-module build phase
- /output/ files for multithreading single-frontend builds (WMO)
- object file inputs to the linker on OS X (response files for binutils
  ld have different quoting rules)

Part 3 of https://bugs.swift.org/browse/SR-280.
2016-01-12 19:20:50 -08:00