Commit Graph

3393 Commits

Author SHA1 Message Date
Mishal Shah
369f19d6bc [Update checkout] Add support for swift-4.2-branch-03-26-2018 2018-04-06 09:31:00 -07:00
Davide Italiano
36f968d9ad [build-script] Disable watchpoint testing in lldb.
Stopgap solution until we have an option we can pass to the
bots. Hopefully will make the bots green again.
2018-04-05 17:36:39 -07:00
Rintaro Ishizaki
8e2a0f1861 [Syntax] ModifierList is a collection of DeclModifier (#15734) 2018-04-04 19:07:37 +09:00
Rintaro Ishizaki
66d400eb1b [Syntax] Parse 'enum' and 'case' declaration (#15704) 2018-04-04 08:38:08 +09:00
Rintaro Ishizaki
18b28b9184 [Parse] Factor out declaration modifier list parsing (#15702) 2018-04-03 19:58:57 +09:00
mishal_shah
c6cbf06c67 [Update Checkout] Use swift-4.2-branch for corelibs in swift-4.2-branch config 2018-04-02 18:18:06 -07:00
swift-ci
38d56eed83 Merge pull request #15628 from kastiglione/lldb-sequence-command 2018-04-02 11:35:10 -07:00
Dave Lee
30ef2ae716 Fix PEP issues 2018-04-02 10:35:05 -07:00
Rintaro Ishizaki
fc3cbcda88 [Syntax] Redesign IfConfigDecl syntax 2018-04-03 01:31:33 +09:00
Vedant Kumar
ca27e829ba Add a transform to help test lldb expression evaluation
The initial version of the debugger testing transform instruments
assignments in a way that allows the debugger to sanity-check its
expression evaluator.

Given an assignment expression of the form:

```
  a = b
```

The transform rewrites the relevant bits of the AST to look like this:

```
  { () -> () in
    a = b
    checkExpect("a", stringForPrintObject(a))
  }()
```

The purpose of the rewrite is to make it easier to exercise the
debugger's expression evaluator in new contexts. This can be automated
by having the debugger set a breakpoint on checkExpect, running `expr
$Varname`, and comparing the result to the expected value generated by
the runtime.

While the initial version of this testing transform only supports
instrumenting assignments, it should be simple to teach it to do more
interesting rewrites.

There's a driver script available in SWIFT_BIN_DIR/lldb-check-expect to
simplfiy the process of launching and testing instrumented programs.

rdar://36032055
2018-03-30 16:50:31 -07:00
Dave Lee
49def952ea Skip empty commands
Mostly likely case is when the last command has a semicolon:

    sequence p 1; p 2;

HandleCommand() fails when given an empty command.
2018-03-30 13:57:21 -07:00
Dave Lee
3c7c04fdc3 Explain the sequence examples 2018-03-30 12:53:33 -07:00
Dave Lee
e43de1c204 Fix mistake in header doc 2018-03-30 12:07:10 -07:00
Dave Lee
c16d0658ea Add sequence command to lldbToolBox 2018-03-30 11:38:24 -07:00
Ben Langmuir
79d641d89b [sourcekit] Add optional compile notifications
When enabled, send a notification before/after every "compilation",
which for now means `performSema`. This piggy-backs and modifies some
existing code that we had for "tracing" operations in sourcekitd that
unfortunately was untested.  At least now some of the basic parts are
tested via the new notifications.

Part of rdar://38438512
2018-03-29 14:59:30 -07:00
Xi Ge
9deabd3581 Merge pull request #15539 from rintaro/syntax-typo
[Syntax] Fix typo
2018-03-27 13:07:27 -07:00
Rintaro Ishizaki
4488e99a04 [Syntax] Parse 'switch' statement 2018-03-28 00:30:21 +09:00
Rintaro Ishizaki
93cd5bce15 [Syntax] Fix typo 2018-03-27 22:58:21 +09:00
Adrian Prantl
c35d00f193 build-script / lldb: rename SWIFTCC -> SWIFTC 2018-03-23 10:55:45 -07:00
Arnold Schwaighofer
269f8c1dd7 build-toolchain: Use the same behavior on macOS as we do on Linux
The default is to run no tests. If you want to run tests you need to pass -t (--test).
2018-03-22 09:41:36 -07:00
Arnold Schwaighofer
fa40f7ac4c Add a --no-test option to build-toolchain
Builds a toolchain without running tests on macos.
2018-03-22 08:59:50 -07:00
Jonas Devlieghere
50f26b58f9 [build-script] Don't set env variables when using lldb-dotest
We already configure lldb-dotest with the swift compiler. This patch
does the same for the path to the swift libraries.
2018-03-21 09:58:54 -07:00
David Zarzycki
dc22a4d54b [build-script] Track underlying CMake/lit changes 2018-03-21 06:47:37 -04:00
David Zarzycki
283713d61d [Testing] Formalize stress tests
Stress tests are, by definition, stressful. They intentionally burn a
lot of resources by using randomness to hopefully surface state machine
bugs. Additionally, many stress tests are multi-threaded these days and
they may attempt to use all of the available CPUs to better uncover
bugs. In isolation, this is not a problem, but the test suite as a whole
assumes that individual tests are single threaded and therefore running
multiple stress tests at once can quickly spiral out of control.

This change formalizes stress tests and then treats them like long
tests, i.e. tested via 'check-swift-all' and otherwise opt-in.

Finally, with this change, the CI build bots might need to change if
they are still only testing 'validation' instead of all of the tests.
I see three options:

1) Run all of the tests. -- There are very few long tests left these
   days, and the additional costs seems small relative to the cost of
   the whole validation test suite before this change.
2) Continue checking 'validation', now sans stress tests.
3) Check 'validation', *then* the stress tests. If the former doesn't
   pass, then there is no point in the latter, and by running the stress
   tests separately, they stand a better chance of uncovering bugs and
   not overwhelming build bot resources.
2018-03-20 21:45:28 -04:00
Jonas Devlieghere
67cd3c490a [build-script] Re-introduce change to run lldb tests with lldb-dotest 2018-03-20 12:29:29 -07:00
Vedant Kumar
c1a34be32f [build-script] Back out change to run lldb tests with lldb-dotest
lldb-dotest does not forward the arguments from DOTEST_EXTRA properly.
For now, just build the lldb-dotest target to ensure the cmake build has
the right dependencies built. Invoke dotest.py manually as before.
2018-03-19 20:32:10 -07:00
Michael Gottesman
e567bc9028 [+0-all-args] Enable +0 normal arguments.
rdar://34222540
2018-03-19 20:25:31 -07:00
Vedant Kumar
cf6bb76f31 [build-script] Use lldb-dotest when testing lldb on Linux
... and pass the build directory explicitly, so the bot knows where to
look to package up test results.
2018-03-19 17:49:32 -07:00
Davide Italiano
694597d5fc Revert "[build-script] Disable watchpoint testing in lldb"
This reverts commit 4858cf691e
as it breaks the lldb bots.
2018-03-19 10:54:27 -07:00
Slava Pestov
fbdd36cda8 Merge pull request #15319 from slavapestov/remove-disable-resilience
Remove build-script flag to disable resilience
2018-03-16 20:37:29 -07:00
Slava Pestov
694fcddf4e Remove build-script flag to disable resilience 2018-03-16 19:56:17 -07:00
Vedant Kumar
4858cf691e [build-script] Disable watchpoint testing in lldb 2018-03-16 18:00:38 -07:00
Vedant Kumar
ac547c649f [build-script] cmake: Use lldb-dotest to drive lldb testing
Using lldb-dotest to drive testing solves the short-term problem of
there being missing test dependencies when we invoke dotest.py for cmake
builds.

Long term, we really want to delete as much lldb-specific logic from
build-script as possible and replace all of it with a single call to
lldb-dotest.

Even with this first cut, there are some nice simplifications
(build-script no longer needs to know how to find an out-of-tree
debugserver, etc).
2018-03-16 16:43:43 -07:00
Vedant Kumar
edf4681fd5 Merge pull request #15290 from vedantk/asserts
build-script: Implement support for --(no-)lldb-assertions
2018-03-16 12:33:36 -07:00
David Zarzycki
900c01fb3c Merge pull request #15233 from davezarzycki/stop_forcing_libcxx_use
[build-script] Stop forcing the use of libcxx
2018-03-16 13:36:03 -04:00
Vedant Kumar
9db99a0a24 build-script: Implement support for --(no-)lldb-assertions
* LLDB assertions are on by default, like swift assertions

* LLDB assertions can be enabled/disabled globally with the --assertions
  and --no-assertions options

Partially addresses: rdar://38524846
2018-03-15 20:45:02 -07:00
Vedant Kumar
7adb7a8eff Re-enable the full lldb test suite for non-smoke-test jobs
The lldb bots should run the full lldb test suite, not just the tests
reserved for pull-request testing.

This does not affect PR testing.

rdar://38462589
2018-03-15 18:13:21 -07:00
mishal_shah
a956a2c740 [Preset] Add support for no assertions toolchain for macOS 2018-03-15 15:11:41 -07:00
Arnold Schwaighofer
69975aae93 Merge pull request #15235 from aschwaighofer/swift4_section_rename
Mark swift sections as swift4 for Swift 4.2
2018-03-14 15:32:20 -07:00
David Zarzycki
b6c3021ed1 [build-script] Stop forcing the use of libcxx
Any C++ standard library is good enough these days.
2018-03-14 18:04:34 -04:00
Vedant Kumar
950b97a327 [build-script] Pass --out-of-tree-debugserver to lldb tests
We need this flag to tell the test harness to skip certain tests.
2018-03-14 12:35:29 -07:00
Vedant Kumar
267de6e2e1 [build-script] Support --lldb-test-swift-only=0
Make it possible to run the full lldb test suite through build-script
again.
2018-03-14 10:58:06 -07:00
Arnold Schwaighofer
0c11e1a0a3 Mark swift sections as swift4 for Swift 4.2
rdar://36363251
2018-03-14 10:27:28 -07:00
Rintaro Ishizaki
bf805e47ea [Syntax] Fix make_missing_child() in C++ API 2018-03-14 20:42:51 +09:00
Rintaro Ishizaki
ea5f93807f [Syntax] Add 'unknown' token to Token.py 2018-03-14 20:38:48 +09:00
Harlan
a03ed4384e [Syntax] Add node definition for enums and enum cases (#15196) 2018-03-13 13:11:13 -07:00
Slava Pestov
7415d35f3a Merge pull request #15194 from slavapestov/enable-resilience-again
Enable resilience again
2018-03-12 21:54:14 -07:00
Rintaro Ishizaki
54b28b6cb6 Merge pull request #15152 from omochi/lex-remove-fields
[Parse] Remove unnecessary Lexer fields
2018-03-13 12:19:36 +09:00
mishal_shah
96b695b55c [Update-checkout] Update the swift-4.2-branch to match clang, llvm, and compiler-rt branches 2018-03-12 18:23:37 -07:00
Slava Pestov
de4f1f8a66 Re-enable resilience for stdlib and overlays 2018-03-12 15:44:07 -07:00