Commit Graph

25 Commits

Author SHA1 Message Date
Greg Parker
6295f3d8b3 Revert "[test] Remove CPU=i386_or_x86_64 hack."
Swift master uses LLVM swift-4.0-branch, which does not yet have
the lit change implementing this syntax.

This reverts commit dfd10ae485.
2017-02-28 14:59:31 -08:00
Greg Parker
dfd10ae485 [test] Remove CPU=i386_or_x86_64 hack.
LLVM lit now supports boolean expressions in REQUIRES: directives.
2017-02-16 16:27:15 -08:00
Bob Wilson
14428834c4 Update some more sil-extract references to the new sil-func-extractor name
Michael renamed this tool and forgot to update these places where the old
name was used.
2016-12-08 21:55:27 -08: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
1fcd7d725d [test] Add '--param swift-version=3' to lit's configuration. (#5566)
This allows us to run our entire test suite (well, okay, just
invocations of swift/swiftc and swift-ide-test) under Swift 3 mode or
Swift 4 mode, which will be more important as the two modes diverge.
The default is Swift 3 mode for now, which matches the behavior before
this patch (because the master compiler still calls itself 3.0).

Individual tests can still use "-swift-version 3" to override the mode
set by lit, but if an entire test requires Swift 3 or Swift 4, there's
also a new test feature "SWIFT_VERSION=3" or "SWIFT_VERSION=4".
However, if you /do/ need to override or restrict the version, you
should also add a test for the "other" version as well, unless it's
part of the Compatibility suite or otherwise specifically testing
-swift-version-related functionality.
2016-11-02 14:01:48 -07:00
Robert Widmann
26f0b582d5 Add information on building and running unit tests 2016-10-11 15:11:23 -04:00
Jordan Rose
ca14c36936 [docs] Fix syntax highlighting issues to support newer Sphinxes. (#4283)
- Update the Pygments lexer we use for parsing Swift-like code.
- State more explicitly which highlighting should be used in which
  code blocks.
- Disable highlighting altogether in certain cases (such as SIL.rst,
  which has equal amounts grammar and SIL excerpts).

This should fix the warnings-as-error issues coming from Sphinx > 1.3.4.

Based on a patch by Jeremy Fergason!

https://bugs.swift.org/browse/SR-620
2016-08-12 22:59:11 -07:00
Dmitri Gribenko
7284caf82d test/lit.cfg: add a new substitution '%FileCheck'
'%FileCheck' removes absolute paths of the source and build directory
from the input.  Overwhelming majority of tests don't intend to match
these paths.

Also add a substitution '%raw-FileCheck' that does not sanitize the
input.
2016-08-10 23:50:57 -07:00
Han Sangjin
0747503b0f [Autolink] Autolinking on COFF for Cygwin/MinGW
Cygwin and MinGW should use the autolink feature in the sameway of Linux
due to the linker's limit. Now swift-autolink-extract recognizes the
COFF format file for Cygwin/MinGW.
2016-08-07 07:20:50 +09: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
Russell Currey
92053493ba docs: Update IR/SIL testing section to include powerpc64{le} 2016-05-11 11:54:55 +10:00
Dmitri Gribenko
457f2b901c CMake & build-script: add a new tier of testing, "long tests"
* The behavior of `build-script -t` is unchanged.

* `build-script -T` continues to run primary and validation test suite,
  but without the long tests.

* `build-script --long-test` runs just the long tests.

* `build-script -T --long-test` runs all tests.
2016-04-16 14:03:54 -07:00
Alex Hoppen
cf05e83067 Added the -frontend parameter to the documentation of the %target-parse-verify-swift substitution since this is the command by which the tool can be invoked manually 2016-04-15 09:05:45 +02:00
swift-ci
56e3875d77 Merge pull request #1806 from drewcrawford/test-infrastructure-squashed 2016-03-29 02:16:59 -07:00
Drew Crawford
a3154616aa [test] add test features static_stdlib
Add a test feature flag static_stdlib, which is enabled if the user
builds the static libraries.

We also add the substitution %target-static-stdlib-path which gives the
path of the static stdlib.

These features allow testing specifically for the static standard
library.
2016-03-23 04:30:47 -05:00
Brian Gesiak
6ac8075079 [docs] Recommend using utils/build-script to test
Contributors likely won't need to invoke CMake directly in order to run the test suite. As such, the current testing documentation is a little misleading: it jumps into a detailed explanation of the `check-swift` family of targets, even though those are abstracted away via the build script. For example, I remember when I first read this document, I spent 20 minutes searching in vain for a build executable named `check-swift`.

Instead, change the wording to make it clear that `utils/build-script` is the best way to run the tests. For those interested in **how** the tests are executed, show an example of a CMake command that runs them.
2016-03-22 21:32:13 -04:00
Dmitri Gribenko
ef89cb4219 Testing.rst: document what XFAIL: linux means 2016-03-22 17:14:38 -07:00
Dmitri Gribenko
226ab38888 CMake / lit: add a mode to run only executable tests
This allows us to quickly run tests affected by implementation-only
standard library changes.
2016-02-12 22:50:42 -08:00
Dmitri Gribenko
27be1ab257 build-script: allow to run host-side iOS tests
This change allows to easily run iOS tests that require only running the
compiler, and don't require running the generated code.
2016-02-04 17:19:12 -08:00
Brian Gesiak
0ede0c4bcd [test] Run Python unit tests in validation tests
This repository includes several Python modules, each with unit tests.
Add a step to the validation tests to ensure these tests pass.
2015-12-27 01:57:33 -05:00
zerotypos-found
0c1df3577e Fix typo: a --> an, an --> a. 2015-12-17 15:10:25 +09:00
Brian Gesiak
e3ef832e35 [docs] More documentation for lit substitutions
Add explanations for lit substitutions marked as "FIXME" in the testing
documentation.

- Place all `%target-*` substitutions in the same section of the
  documentation.
- Remove substitutions that are no longer available or in use, such as
  `%llvm-opt` and `%leaks-runner`.
- Use uniform spacing between all substitutions bullet points.
2015-12-10 20:50:14 -05:00
Steve Moser
95a7a036cc Fix typos 2015-12-03 13:00:30 -05:00
Dmitri Gribenko
4f8773f40e Add a test feature 'swift_ast_verifier' 2015-11-30 21:07:13 -07:00
David Farler
e2734bd92f Add missing docs/Testing.rst
rdar://problem/23359113
2015-11-02 13:54:34 -08:00