Commit Graph

82 Commits

Author SHA1 Message Date
Jens Johansen 6e9c74274c Also output --network for testing http server commandline
If for instance running ddc kernel tests via

tools/test.py -mrelease -cdartdevk language_2 -v

one is told that a http server is started with a command line that will
create a http server listening to 0.0.0.0, while generally the one
actually launched by the testing scripts only listen to 127.0.0.1.

This CL adds the extra --network output to the command line given.

Bug:
Change-Id: Ifd9278360efb0b12249fe866c49ed923f7e73b0e
Reviewed-on: https://dart-review.googlesource.com/24102
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-11-29 07:30:40 +00:00
Bob Nystrom c341575a53 Colorize section headers and slightly clean up test output.
Of course, if you're not using the color formatter, it stays uncolored.
But this gets rid of some unnecessary empty lines and section headers
that have no content.

Change-Id: I5b83345c583b79468af84f4e67a12ee757a3105f
Reviewed-on: https://dart-review.googlesource.com/14720
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2017-10-19 21:45:57 +00:00
Bob Nystrom ba2e4aff24 Some minor clean-up in test.dart.
- Fix fuzzy arrow errors.
- Default the Dart repo URI so it doesn't always need to be explicitly
  set.
- Run dartfmt on everything.
- Move some members out of the garbage bin "TestUtils" class:
  - Move the stuff around the Dart repo directory to a new Repository
    class.
  - Move absolute() into Path where it belongs.
  - Move workingDirectory in Path since it is a Path.
  - Delete the random number stuff since it was apparently unused.

Change-Id: I3dab3a4f1713b7a749e64b6776149d05a0ce1b69
Reviewed-on: https://dart-review.googlesource.com/14502
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2017-10-19 19:05:58 +00:00
Stephen Adams 88388cb5ca Revert "Remove support for "packages" URL from testing server."
This reverts commit f38f91bb7e.

Lots of browser bots are red with this change.
Hopefully it can be recommitted atomically with changes that fix the redness.

TBR=whesse@google.com

BUG=

Review-Url: https://codereview.chromium.org/2997753002 .
2017-08-10 17:04:21 -07:00
William Hesse f38f91bb7e Remove support for "packages" URL from testing server.
This support was only needed for testing Dartium.
This also removes the dependency upon package_resolver from test.py.

BUG=
R=eernst@google.com, mkroghj@google.com

Review-Url: https://codereview.chromium.org/2994073002 .
2017-08-10 14:33:07 +02:00
Bob Nystrom 19cb0cafb7 Simplify test_suite.dart.
- Get rid of baseCommand, which is only ever an empty list.
- Move some utility classes out of the giant test_suite.dart.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2915843003 .
2017-06-09 16:46:49 -07:00
Bob Nystrom 7e2d9ac85d Revert "Revert "Replace the configuration map with a typed object.""
This reverts commit 8bada4873a.

R=nweiz@google.com

Review-Url: https://codereview.chromium.org/2919573003 .
2017-05-31 15:39:23 -07:00
Bob Nystrom 8bada4873a Revert "Replace the configuration map with a typed object."
This reverts commit 06f75fe5cd.

Review-Url: https://codereview.chromium.org/2914893003 .
2017-05-31 15:08:21 -07:00
Bob Nystrom 06f75fe5cd Replace the configuration map with a typed object.
This is a pretty massive change but my hope is it will make
test.dart easier to maintain going forward. Instead of
passing around a stringly-typed Map<String, dynamic> all
throughout the program, we parse the options and then create
a Configuration object that has typed getters for all of the
various bits of configuration data.

This is a little tedious because it means declaring a new
option requires also declaring a corresponding field in the
Configuration class and passing it through the constructor.
I think it's worth it.

Also, enum-like configuration properties like architecture
and runtime now have their own classes as well. Moved a
bunch of stuff from TestUtil into those classes now that
there is an object to hang those methods off of.

In the process, I found a few typos in string literals where
the code wasn't correctly looking up a configuration
property.

Added more sanity checking and validation to status file
parsing. You will get an error at parse time if you try to
refer to a variable that isn't in the whitelist of known
variables. Also, you'll get an error if you try to compare
a variable to a value that it isn't expected to have.

Many other small-scale cleanups.

Aside from the status file validation, this should behave
mostly the same as current test.dart except that tests
may be enqueued in a slightly different order. The
rewritten code for expanding configurations iterates
through the architecture, runtime, etc. options in a
slightly different order.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2901923003 .
2017-05-31 14:47:31 -07:00
Bob Nystrom 7ce978bf91 Tighten types in test.dart even more.
This removes all implicit casts and many implicit uses of dynamic. It
adds a gratuitous number of explicit "as" casts and arguably makes the
code worse.

This is an interim step towards replacing the big configuration map
with an actual typed object. These "as" casts should help catch places
where the configuration object is being used and where the code will
need to be changed to use a new object.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2903703002 .
2017-05-30 14:02:24 -07:00
Bob Nystrom e0180925f6 Tighten up a bunch of types in test.dart.
This doesn't get rid of all implicit dynamic and casts, but it covers
many of them.

Also did some minor modernization when I noticed it:

- Using "var" for local variables where inference does the right thing.
- camelCase for variable names.
- More collection literals.

There are (or should be!) zero behavioral changes.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2863253002 .
2017-05-15 15:26:40 -07:00
Bob Nystrom f5471fb948 Make test.dart strong mode clean!
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2855883008 .
2017-05-04 10:48:39 -07:00
Bob Nystrom 9cd2f83ef7 Small-scale clean ups in test.dart, mainly around test_progress.
Stuff like:

- Use core lib methods like padLeft() now that they exist.
- Use collection literals (!).
- Use getters where appropriate.
- Make Formatter enum-like since it has no interesting instance state.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2855073002 .
2017-05-03 16:50:45 -07:00
Jacob Richman 119b2d58ce Format all files under tools and utils directory.
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2827793002 .
2017-04-20 09:08:31 -07:00
William Hesse 88a64b77bf Add support for package spec to testing HttpServer.
BUG=https://github.com/dart-lang/sdk/issues/27065
R=terry@google.com

Review URL: https://codereview.chromium.org/2347423003 .
2016-09-19 18:43:16 +02:00
William Hesse 9b8f01f80e Add --packages flag to test.py, to specify a package spec file.
BUG=https://github.com/dart-lang/sdk/issues/27063

Review URL: https://codereview.chromium.org/2240193002 .
2016-08-12 15:44:09 +02:00
William Hesse c63b10b611 Format the test scripts in /tools/testing/dart using dartfmt 1.16.0-dev.3.0.
R=ahe@google.com

Review URL: https://codereview.chromium.org/1859973002 .
2016-04-06 14:49:18 +02:00
William Hesse 2573093c50 Switch to downloaded SDK executable, drop executables in testing/bin.
BUG=https://github.com/dart-lang/sdk/issues/24311
R=ricow@google.com

Review URL: https://codereview.chromium.org/1697203002 .
2016-02-15 17:10:59 +01:00
Sigmund Cherem e6f6ce9743 fix safari test
Apparently my approach to use wss didn't work to exercise the error codepath. This change makes us excersize errors. After testing this in Safari though, I coudln't reproduce the issue, so I remove the note about this being a regression test for the original issue.

Review URL: https://codereview.chromium.org/1513363003 .
2015-12-10 16:02:27 -08:00
kevmoo@google.com 47de553025 tools/testing: move code into individual libraries
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42108 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 15:32:57 +00:00
whesse@google.com 84b0209a77 Add test/xml content type to test server.
BUG=dartbug.com/21525
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41566 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 16:37:16 +00:00
whesse@google.com 1c840e6f01 Re-land r41544 "Update dart binaries used for running tests to version 1.7.2"
This also re-lands r41546, and some status file updates.

BUG=dartbug.com/21525 21526 21527
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41562 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 15:28:56 +00:00
whesse@google.com 0624b4f7b7 Revert r41544 "Update dart binaries used for running tests to version 1.7.2"
Also revert fixes for test scripts for this update, r41546

BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41547 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 11:41:49 +00:00
whesse@google.com 207f9eacb4 Fix test scripts and xhr test for new default HTTP headers
BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41546 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 09:59:51 +00:00
whesse@google.com 49acd886b9 Improve handling of intentionally broken links in test scripts.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41492 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 15:00:00 +00:00
whesse@google.com 33e51a5295 Update co19 test suite to r786.
R=kustermann@google.com, ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40832 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-01 09:36:32 +00:00
ricow@google.com 8bfaae17ea Add package-root option to the testing scripts
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39971 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 15:44:45 +00:00
whesse@google.com 94f0a3f3fd Refactor testing http server in test.dart.
BUG=
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39867 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-04 12:58:19 +00:00
whesse@google.com 48065a1f91 Update test scripts to run under the Dart 1.6 vm.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39443 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 09:30:10 +00:00
ahe@google.com c5a9af1d62 Send data with 404 response
The primary reason is to work around http://dartbug.com/19024, but this is not a hack or temporary code.

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36675 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 13:30:49 +00:00
whesse@google.com dae3c92848 test.dart: Handle checkout paths containing spaces.
Change TestUtils to correctly convert from a URI to a file path, and
simplify the setting of the path to the Dart checkout.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36299 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-19 14:30:26 +00:00
whesse@google.com bede5d4373 Reduce test.dart memory usage.
BUG=dartbug.com/18084
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35313 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 15:07:47 +00:00
whesse@google.com 55546df84a Update co19 test suite to r706
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34826 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 14:48:59 +00:00
whesse@google.com 5578cc0ce0 Revert co19 roll (revert r34468)
Some path names of generated files for new co19 tests are longer than the Windows pathname limit of 254 characters.

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34471 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 13:25:35 +00:00
whesse@google.com 412fb33dac Update co19 test suite to r706
BUG=dartbug.com/17758
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34468 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-27 12:14:00 +00:00
whesse@google.com 4a396e2e7b Fix type error in test.dart.
BUG=
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33688 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 10:00:51 +00:00
efortuna@google.com 9d53b1d682 Replace run_selenium.py with Dart script that uses the browser controller for performance tests.
BUG=
R=kustermann@google.com, ricow@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33171 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 21:06:28 +00:00
sigurdm@google.com 0b1fee8131 Let deferred load work from worker isolates.
If we try to load a deferred library from a worker-isolate we cannot
inject a script tag because we do not have access to the dom. Instead we
make an XMLHttpRequest object and load the code with that.

I tried to take some care of error handling introducing a new exception.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32693 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-14 12:12:58 +00:00
kustermann@google.com bb54b776ba Checked-in binary update to v1.0.0.3
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30717 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 14:17:44 +00:00
kustermann@google.com 45c42e08f2 Update checked-in binary to 0.6.21.3_r26639 (M6)
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26704 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 11:16:37 +00:00
kustermann@google.com 4fd637523f test.py: Add 'Cache-Control' header to http responses: enable browsers to cache resources
BUG=http://dartbug.com/10697
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25265 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 11:52:50 +00:00
ricow@google.com 545f6e1341 Update checked in binary to version 0.5.19.0
This is a reland of r24086 with a fix catching errors in the websocket server in tools/testing/dart/http_server.dart.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24520 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 16:10:59 +00:00
ricow@google.com 4c5b2ac2ab Revert 24086 Update checked in binary to version 0.5.19.0
This is causing crashes in http server.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24096 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 13:22:15 +00:00
ricow@google.com 1970fc7afb Update checked in binary to version 0.5.19.0
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24086 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 10:47:02 +00:00
kustermann@google.com e12204ec6d Ignore harmless paths in the http_server.dart
So far we often get a lot of warnings in the debuglog because browsers try to
access harmless non-existent files.

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23128 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 09:19:07 +00:00
kustermann@google.com 2a49e58294 Added support for running dart2js tests on android devices
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23022 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 15:34:32 +00:00
ricow@google.com e7f790dba5 Fix csp flags send to browsers.
We can't send the webkit flag to chrome, it will throw an error.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22178 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 12:02:49 +00:00
floitsch@google.com 5431a5af54 Remove AsyncError with Expando.
Review URL: https://codereview.chromium.org//14251006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21498 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 18:58:32 +00:00
blois@google.com 6fad216eb7 Expanding WebSocket test
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20797 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 16:45:09 +00:00
blois@google.com e52412a9fd Fixing IE10 CORS test.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20126 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 23:35:16 +00:00