Commit Graph

579 Commits

Author SHA1 Message Date
paulberry@google.com b855a781d6 Remove RefactoringId from the analysis server API.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//446113002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38954 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 21:07:59 +00:00
paulberry@google.com 5353760386 Change the type of Error.code from int to String.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//446983002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38940 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 18:44:13 +00:00
paulberry@google.com 0f559b00b0 Add analysis server API specification and related tools.
The source for the API specification is in
pkg/analysis_server/spec/spec_input.html.  This file uses custom HTML
elements to declare the machine-readable parts of the specification.

The script pkg/analysis_server/spec/generate_files processes that file
and creates two output files:

- pkg/analysis_server/spec/api.html, the human-readable analysis
  server spec.

- pkg/analysis_server/test/integration/protocol_matchers.dart, which
  is used by integration tests to check the data returned by the
  analysis server.

R=brianwilkerson@google.com, jwren@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//443873006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38937 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 18:34:21 +00:00
jwren@google.com 353546ff4a Use checked mode in server integration tests
R=paulberry@google.com

Review URL: https://codereview.chromium.org//445703003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38912 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-05 22:23:48 +00:00
paulberry@google.com ec6f1dfb64 Simplify handling of pathnames in integration tests.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//437383003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38890 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-05 03:30:06 +00:00
paulberry@google.com 7e36498dd4 Add more matchers for use in analysis server integration testing.
R=jwren@google.com

Review URL: https://codereview.chromium.org//439313003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38868 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-04 17:15:09 +00:00
paulberry@google.com 44f58316a1 Wait for "server.connected" notification before beginning integration tests.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//429383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38795 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-31 20:28:43 +00:00
paulberry@google.com e2ac6f3b52 Get rid of unnecessary calls to toDouble().
R=scheglov@google.com

Review URL: https://codereview.chromium.org//431713002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38749 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 20:16:19 +00:00
paulberry@google.com c243ffe3a2 Better implementation of shutdown timeout.
In addition to being easier to read, Future.timeout() has the
advantage that if the future completes before the timeout, there isn't
a pending asynchronous event unnecessarily keeping the process alive.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//425803009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38748 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 20:15:01 +00:00
paulberry@google.com 99b36c3748 Increase shutdown timeout to work around slow analysis server startup time.
TBR=scheglov@google.com

Review URL: https://codereview.chromium.org//430013002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38746 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 19:12:54 +00:00
paulberry@google.com dc95ca2d0e Add timestamps to integration test output.
This should aid in debugging buildbot failures.

TBR=scheglov@google.com

Review URL: https://codereview.chromium.org//430803003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38743 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 18:20:32 +00:00
paulberry@google.com b1bb36946f Integration tests for analysis.updateContent.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//423393005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38741 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 17:55:27 +00:00
paulberry@google.com 6c74d75f6d Make "server.shutdown" exit the analysis server.
Also update integration tests so that they use "server.shutdown" to
terminate each test.  This ensures that repeatedly running integration
tests does not cause an accumulation of analysis server temporary
files.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//426243005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38739 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 17:38:40 +00:00
paulberry@google.com 6856764b79 Allow analysis server integration tests to run without package root.
Since the analysis server will periodically be released via pub, some
users may try running integration tests using the a local "packages"
directory rather than specifying a package root.  When this happens,
avoid sending an empty "--package-root=" option to the VM.

R=danrubel@google.com

Review URL: https://codereview.chromium.org//431593002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38731 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 13:41:32 +00:00
paulberry@google.com cb63f50483 Fix analysis server integration tests on Windows.
Platform.script is a URI.  To safely convert it to a Windows path we
need to use .toFilePath(windows: ...).  Previously we used .path,
which resulted in passing nonsensical paths to the VM when invoking
the analysis server subprocess.

BUG=dartbug.com/20252
R=ricow@google.com

Review URL: https://codereview.chromium.org//423283002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38730 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 12:40:34 +00:00
paulberry@google.com df750aef30 Fix analysis server integration/test_all.dart.
This was accidentally broken when the integration test files were
renamed in r38661.

Also, remove a stray call to debugStdio() that was accidentally left
in the analysis domain integration tests.

R=danrubel@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//422343005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38687 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 18:09:31 +00:00
ricow@google.com 4352e4f6ae Remove package root hack from the analysis server integration testing
Use the one provided by Platform instead.

Remove suppression from status file

BUG=20251
R=paulberry@google.com

Review URL: https://codereview.chromium.org//423143002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38674 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 15:38:45 +00:00
ricow@google.com c913a21cb6 Start running the analysis server integration tests by changing the name to end with _test.dart
Note that these will not run on the vm bots, only on the pub/pkg bots on the right.

I would rather that we keep this in the normal setup. If we are seeing to long cycle times we should shard these machines instead of special casing.

Sorry if you wasted time doing the new specialized test suite.

If we want to, we can skip this on specific platforms in the status files(qua comments in mail thread), but I don't think we should

I ran this in a loop on my linux box for a few hours, no flakes.

R=whesse@google.com

Review URL: https://codereview.chromium.org//426923002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38661 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 11:11:50 +00:00
paulberry@google.com 7d60f1b13c Add integration tests for analysis.getErrors.
R=scheglov@google.com

Review URL: https://codereview.chromium.org//430433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38658 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-29 04:07:11 +00:00
paulberry@google.com 099b8ba634 Add placeholder test for completion domain.
R=jwren@google.com

Review URL: https://codereview.chromium.org//428683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38642 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 19:05:25 +00:00
paulberry@google.com b598db2dcc Start writing analysis server integration test for 'completion.getSuggestions'.
The test is currently incomplete (and hence disabled) due to
dartbug.com/20188.

R=jwren@google.com

Review URL: https://codereview.chromium.org//412323002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38559 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 22:08:10 +00:00
paulberry@google.com 61d702cc89 Handle bad data in analysis server integration tests.
If bad data is received from the analysis server (e.g. a stacktrace),
switch on debugging output, let the integration test run for 1 more
second (to collect the entire stacktrace), and then fail the
integration test.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//418033006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38545 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 17:39:25 +00:00
paulberry@google.com 9861f6e1d0 Use package root in analysis server integration tests.
R=jwren@google.com

Review URL: https://codereview.chromium.org//411123002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38527 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 23:59:32 +00:00
paulberry@google.com 01d0779b85 Allow an analysis server response to have both "error" and "result" fields.
Usually this won't happen, but there are rare cases where it might
(e.g. an unexpected exception occurs while analyzing a file in
response to analysis.getErrors, and some error information has already
been successfully computed).

So it seems best to allow it in the integration tests.

R=jwren@google.com

Review URL: https://codereview.chromium.org//415663002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38516 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 18:10:10 +00:00
paulberry@google.com 05e4acbc0d Fix analysis server 'analysis.getHover' when there is no hover information.
Previously we returned {'hovers': [null]}.  We now return {'hovers': []}.

Also, tweak the analysis.getHover unit tests to use futures uniformly
rather than a mix of futures and CPS.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//407443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38366 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 03:30:19 +00:00
paulberry@google.com b660abdcc6 Three new analysis server integration tests
1. server.setSubscriptions (invalid service)
2. analysis.getHover (normal operation)
3. analysis.getHover (no hover information available)

Test 3 is disabled because it currently fails due to an analysis
server bug.

R=scheglov@google.com

Review URL: https://codereview.chromium.org//405473006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38364 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 02:20:53 +00:00
paulberry@google.com 44a7ca5254 Remove 'errorCode' field from AnalysisError in the analysis server API.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//402493002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38331 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 15:05:21 +00:00
paulberry@google.com 045aa3e5bd More integration tests for analysis server.
This covers everything in the "server" domain except for server.error
(which is difficult to test since it should only occur in the event of
a server bug).

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//396383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38319 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 23:46:36 +00:00
paulberry@google.com 6ab7a41e1f Start writing integration tests for the analysis server.
R=brianwilkerson@google.com, jwren@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//398693002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38288 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 16:02:24 +00:00