Commit graph

204 commits

Author SHA1 Message Date
Karl Klose 7387682bec [infra] Handle test steps with no tested configuration
Change-Id: I95543f88a64884bf2334165baa986d381bbf7872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141241
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
2020-03-27 07:09:37 +00:00
Karl Klose 77d50308dd [infra] Use pkg/smith's test matrix support in test.dart
Change-Id: I193651bc471191b9d45345dead9af1b428ceb3a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133239
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-01-31 11:47:31 +00:00
Karl Klose c218b4309e [infra] Improve error reporting in test.dart
This CL changes test.dart to
- improve errors reporting with multiple configurations and builders
  by tracking the builders for each configuration separately
- improve output of which configurations and which builders are
  tested
- fix a missing check for the case that at least one invalid and
  one valid configuration was used
- remove a class and some type annotations

Change-Id: If91e3033c3892c39243327101d3017a5f8e710c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130369
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-01-07 14:45:25 +00:00
Karl Klose 21e3580519 [infra] Use resolved configuration names instead of those provided as argument
Change-Id: I72fe74e1052c9c82eaf12e8c510501b037aa00a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130361
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-01-06 11:49:09 +00:00
Karl Klose 7c3b2b75c8 [infra] Fix deflaking in test.dart
Change-Id: I6f04d41097defa889fe62566f675ec834a3f0a52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126642
Auto-Submit: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2019-12-04 08:39:09 +00:00
Karl Klose 696069c9a2 [infra] test.dart: Download build results while running the tests
Change-Id: Ieb92069e08d9a1df8e0692b27086616b4d71e66e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124329
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-11-18 10:07:03 +00:00
Karl Klose ec0d042955 [infra] Support multiple named configurations in test infrastructure
This change allows to run test.dart and pkg/test_runner with multiple arguments
for the -n option to run tests for multiple configurations with one invocation.

Change-Id: If62e0bfc364460fa415c7f700f7e449b0de56987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122395
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2019-11-08 08:06:36 +00:00
Samir Jindel c885bdde1d [vm] DBC is obsolete. Remove dead code.
Change-Id: Ica33af158cca53c8e951e4b2582de83660e8a60d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121851
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-27 18:18:29 +00:00
Todd Volkert c92af46433 Update HttpRequest and HttpClientResponse to be Stream<Uint8List>
Bug: https://github.com/dart-lang/sdk/issues/36900
Change-Id: I1306b2df7c789597e49d2033b660a3ea62d6c1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104525
Commit-Queue: Todd Volkert <tvolkert@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-06-27 00:21:07 +00:00
Alexander Thomas 14b1d2feb8 [infra] Make deflaking optional in test.dart
This adds a "--deflake" flag to test.dart. Deflaking will only run if
that flag is set.

Deflaking is time consuming and delays the information that users want
to see when most of the time they know that the result is not caused by
flakiness.

A typical session may look like this:
* Run test.dart with a broad test selector without deflaking.
* Re-run test.dart with a narrow test selector for suspected flakes with
  "--deflake". This second step is optional.

Additionally, a new "--report-flakes" flag is added that can be
used to report test failures for tests known to be flaky.

Change-Id: I543d0b40c32065eb0a50338c55e7050b7887abce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102381
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-05-23 12:56:06 +00:00
Jonas Termansen 1c02016b7b [infra] Fall back on inexact baseline commits in test.dart.
This change makes test.dart handle if the baseline commit hasn't been built
on the requested builder and instead attempts to search for whether there's
results for up to 25 preceding commits, which it then uses as an inexact
baseline.

Closes https://github.com/dart-lang/sdk/issues/36211

Change-Id: Ie44042c67c9460826736f4a2cf159d8d7b455f0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96944
Reviewed-by: William Hesse <whesse@google.com>
2019-03-14 17:04:36 +00:00
Jonas Termansen 8f03ae05ff [infra] Add --list-configurations option to test.dart.
This option makes the available named configurations much more discoverable.

Additionally this change expands the available named configurations by
generalizing the operating system and processor architecture patterns
in the named configurations. This change should ensure that nobody is doing
any local testing that isn't covered by a named configuration.

Change-Id: I776105955a86e9f0403ce07a3cdf971e4213646f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96320
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2019-03-11 18:04:59 +00:00
Jonas Termansen def0b21225 [infra] Fix test.dart saying untested configurations don't exist.
There are more named configurations in existance than the ones that actually
run on the builders.

Change-Id: Ie91e71fcec6014830fe286b33c856177fb30c2a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96380
Reviewed-by: Alexander Thomas <athom@google.com>
2019-03-11 17:43:03 +00:00
Jonas Termansen 6c8dbd84a0 [infra] Support different local named configurations in tools/test.dart.
This change lets one download the results for one named configuration but do
the local testing with another named configuration. This change addresses
the issue of developers needing to do local testing where there is no
builder matching their local environment. This allows e.g. a dart2js
developer on Windows to use the results for the Linux variant of the same
named configuration, which should be identical or close enough for the
comparison to be meaningful.

Fixes https://github.com/dart-lang/sdk/issues/36151

Change-Id: I1a387a9767cdf5ba99964535478201c0142f15e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96102
Reviewed-by: William Hesse <whesse@google.com>
2019-03-08 16:56:40 +00:00
Jonas Termansen 9645b19060 [infra] Link to the documentation in the new workflow tools.
Change-Id: Idf8181a1d007fa624e04087a7949f5f04da3b077
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95645
Reviewed-by: William Hesse <whesse@google.com>
2019-03-06 15:06:40 +00:00
Jonas Termansen d1abd84944 [infra] Add named configuration option to test.dart.
This change makes named configurations central in test.dart. Previously
test.dart would attempt to emulate the steps taken by a builder. Instead it
now runs a single named configuration as a single step and invokes test.py
directly without any other arguments from the test steps. This better
matches the behavior of test.py and what the developers expect.

Either a named configuration or a builder must be specified. If both are
provided, then the results for that builder is downloaded and used to
compare with when running the named configuration. Otherwise if the only the
named configuration is provided, then it downloads results from all the
builders using the named configuration. Finally if only the builder is
provided, then the named configuration defaults to the one tested by the
builder. If the builder has multiple named configuration, the user is
asked to clarify which one should be tested.

This change adds support for branches to the test matrix. test.dart needs to
know which builders are on which branch, so it can download the relevant
results, and not look on builders that won't be building the right commit.

Fixes https://github.com/dart-lang/sdk/issues/35873
Change-Id: Ie7b75445b954250493528299a0b45eca4e0bb2e5
Reviewed-on: https://dart-review.googlesource.com/c/92780
Reviewed-by: William Hesse <whesse@google.com>
2019-02-15 11:48:40 +00:00
Jonas Termansen fb7d075cfa [infra] Use third_party/gsutil in the status file free workflow.
Change-Id: I13d68092874121acedec305a186867ee88863806
Reviewed-on: https://dart-review.googlesource.com/c/90463
Reviewed-by: Alexander Thomas <athom@google.com>
2019-01-23 12:52:41 +00:00
Jonas Termansen de4dea71d7 [infra] Add Windows support to test.dart.
Change-Id: I1070b630f14a7a0b00d828f0fae47ec80d09d292
Reviewed-on: https://dart-review.googlesource.com/c/90464
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-01-23 12:46:06 +00:00
Jonas Termansen 03730d9acc [infra] Fix test.dart error handling if there's no base build.
Bug: https://github.com/dart-lang/sdk/issues/35360
Change-Id: Ief81cc626ab10095de000a97373357e447576618
Reviewed-on: https://dart-review.googlesource.com/c/86761
Reviewed-by: William Hesse <whesse@google.com>
2018-12-10 12:49:55 +00:00
Jonas Termansen 007e386b13 [infra] Add progress information to test.dart and fix logs.
This change takes advantage of the new --clean-exit and --silent-failures
options to test.py, which means the test.py native progress bar can be used.
test.py exiting 0 if results were written out, no matter the results, lets
us properly handle if the program failed.

The output is now sectioned to make it more readable, and if no tests
failed, then the program says so.

This change also fixes logs which were broken because the logs for the steps
weren't merged, and the main test.py run wasn't even being passed the
--write-logs option.

This change also fixes directly starting dart scripts as an executable
rather than using the platform resolved executable.

TBR=whesse@google.com

Bug: https://github.com/dart-lang/sdk/issues/35359
Change-Id: I7bed009475df3ffea01c9e805513d0e04e77427c
Reviewed-on: https://dart-review.googlesource.com/c/86568
Reviewed-by: Jonas Termansen <sortie@google.com>
2018-12-07 16:07:18 +00:00
Jonas Termansen 191a09f540 [infra] Add support for logs to tools/test.dart.
Bug: https://github.com/dart-lang/sdk/issues/35307
Change-Id: I770199da3bed89d41017d806d289195b22377b4f
Reviewed-on: https://dart-review.googlesource.com/c/85741
Reviewed-by: William Hesse <whesse@google.com>
2018-12-04 16:07:56 +00:00
Jonas Termansen 927f0937bd [infra] Add test.dart script for local testing.
test.dart locates where the current branch branched off master and compares
the local testing results with the appropriate mainline builder results,
letting you know how the current change compares without the need for status
files.

Bug: https://github.com/dart-lang/sdk/issues/35086
Change-Id: Ib79479b867c5ac131302fea1bdf7effd0422a83a
Reviewed-on: https://dart-review.googlesource.com/c/83281
Reviewed-by: Alexander Thomas <athom@google.com>
2018-11-12 21:51:48 +00:00
Bob Nystrom 53b2ef34ca Move test.dart into testing/dart.
This is mainly so that all of the code relating to test.dart is in one
directory tree so things like "Find All Usages" work a little better.
It felt weird to me to have a .dart file two directories up importing a
bunch of stuff within "testing/dart/".

Also cleaned up the affected code since it could use a little love. I'm
working on getting test.dart running DDC tests, but from poking around,
it seems like it could use some housekeeping as well.

R=vsm@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2848103002 .
2017-05-02 16:48:28 -07:00
Erik Corry 4b9bba55b4 Stoppp using trippple consonants
R=ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2833073002 .
2017-04-21 17:50:13 +02: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 92cd3e10f5 Fix test.py and tests to use an explicit --packages flag.
BUG=https://github.com/dart-lang/sdk/issues/27412
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2361813003 .
2016-09-22 17:51:09 +02:00
William Hesse 523ceac525 Fix type error in test.dart script.
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2264003002 .
2016-08-22 11:50:05 +02:00
Martin Kustermann 620b896e2f Initial support to test.dart for running precompiler tests on android devices
Steps to make this work:

a) Make sure you have an android sdk checkout:

  => See https://github.com/dart-lang/sdk/wiki/Building-Dart-SDK-for-Android

b) Building using android-toolchain crosscompiler:

  $ ./tools/build.py -mrelease -aarm --os=android dart_precompiled_runtime

  => Notice --os=android

c) Testing using attached android phones:

  $ export PATH=$PATH:$PWD/third_party/android_tools/sdk/platform-tools
  $ ./tools/test.py -mrelease -aarm --system=android -cprecompiler -rdart_precompiled --use-blobs

  => Notice --system=android

Failing tests on android can be marked in status files via:

[ $compiler == precompiler && $runtime == dart_precompiled && $system == android ]

R=whesse@google.com

Review URL: https://codereview.chromium.org/1922163002 .
2016-05-02 12:41:22 +02: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
kevmoo@google.com 61b056964a tools: removed unused members, tiny cleanup
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42106 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-04 13:56:14 +00:00
ricow@google.com 802c618118 Move test config files under tools/testing/dart
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41561 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 14:21:19 +00:00
ricow@google.com 94e1160661 Add PKGTestSuite that will be used for package waterfall testers.
This is based on the standard test suite but we specialcase html files.

There is another html file aproach currently being done by whesse@ that we may be able to utilize when it is done instead.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40255 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 17:16:35 +00:00
rnystrom@google.com 4acbe3d75a Find pub status file in right directory.
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40123 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 22:38:24 +00:00
rnystrom@google.com 17c1642748 Store the async-await compiled pub code directly in the repo.
R=nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40041 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 16:55:16 +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
collinsn@google.com 2ccac8093b Add language tests for Issue 18628.
As suggested by @karlklose in https://codereview.chromium.org/513563002/
comments.

Improve testing documentation.

- add a README
- add a description by example of selectors to the "./tools/test.py -h"
  output
- update/add source comments

I had a hard time figuring out how to add and run the tests, mostly
because I tried to call them "*_test_1.dart" and "*_test_2.dart", but
language test files must have names of the form "*_test.dart".  So, I
added a README summarizing and referencing the relevant docs.

R=brianwilkerson@google.com, karlklose@google.com, jwren@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39822 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 18:51:25 +00:00
ricow@google.com 3331fd5366 Put selector generation for the suite_dir runs in the same place as the other selector expansion
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39796 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 08:12:39 +00:00
ricow@google.com 8327e55137 Support passing in a test suite directory through a flag to the testing scripts
This will allow us to setup testing that mirrors what we currently have even with the packages moved to github.

R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39735 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-02 05:20:34 +00:00
ricow@google.com 418a550d1c Add package links for the observatory and enable testing
This will make them run on the vm bots, not the pkg bots (I can move them if need be by changing the exclude filter, but I assume you want full vm coverage for this? )

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39021 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-08 07:47:44 +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
ricow@google.com 6be37386e0 Add mobile safari simulator support in the testing scripts
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35626 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 11:32:08 +00:00
ricow@google.com 9a9ca47034 Add clear_browser_cache flag to test.dart
This can be used by any browser implementation to flush browser specific caches if set

clear_safari_cache is left in as a synonym for now, I will remove if after I update the bots
Review URL: https://chromiumcodereview.appspot.com//252653007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35477 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-28 09:38:31 +00:00
kevmoo@google.com 441bd85c9f Fix JSON tests, re-enable in all cases - 2nd try
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34457 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 23:11:40 +00:00
ahe@google.com 19a5147493 Add a test suite for Try Dart!
R=kasperl@google.com, lukechurch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34360 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 14:08:36 +00:00
ricow@google.com 9c5986c69e Add back swarm to our tests by adding a samples-dev status file and enabling the path in the test driver
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32551 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 11:31:44 +00:00
dgrove@google.com ed59ab7a67 Remove more tests which depend on dartdoc, which has been deleted.
Review URL: https://codereview.chromium.org//156903004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32393 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 23:41:13 +00:00
ricow@google.com c2f12c4da6 Add support for copying coredumps to /tmp
This will be used on the bots to be able to archive dumps from unexpectec crashes.

The tools/archive_crash.py tool will be used to actually archive the dumps to gcs and delete the local copies. The reason for the split is to enable developers to actually utilize this locally as well (run tools/test.py in a loop but don't archive the expected crashes). Additionally, this puts the bot specific code in the small python script.

R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32111 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 09:41:47 +00:00
kustermann@google.com 54b71bdbe2 Reaply "Use a real package-root for all of our samples (and tests inside a package) instead of buildDir/packages/"
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31694 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 15:15:37 +00:00
kustermann@google.com dc24212755 Added PkgBuildTestSuite (aka 'pkgbuild')
This CL adds
 - support for fetching dependencies via 'pub get' of samples/packages
 - support for building applications/samples via 'pub build' (or a custom
   build.dart file)
 - pkg/pkgbuild.status: Status files for all package checkouts/builds
 - the '--use-public-packages' option to test.dart
 - the CleanDirectoryCopyCommand, PubCommand, ModifyPubspecYamlCommand commands

The test suite can be executed with:
 $ ./tools/test.py -mrelease --use-sdk pkgbuild
 $ ./tools/test.py -mrelease --use-sdk --use-public-packages pkgbuild

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31535 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 09:36:27 +00:00