Commit Graph

195 Commits

Author SHA1 Message Date
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
kustermann@google.com 26f065bdb2 Add .test-outcome.log support to test.dart
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30768 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-29 08:29:20 +00:00
kustermann@google.com 1d98fa26bb Only enqueue VmTestSuite on compiler=none,runtime=vm
Review URL: https://codereview.chromium.org//91633003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30720 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 15:17:44 +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
whesse@google.com 36fe570a31 Remove the --use_browser_controller flag, now that it is always true.
Fix an error in r30269.

BUG=
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30270 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 15:20:31 +00:00
kustermann@google.com b5373a419a Run all tests inside an iframe + restrict number of chrome browser processes on mac
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29367 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 16:31:18 +00:00
kustermann@google.com cf822a851a test.py: Run the analyzer on all dart files in the sdk.
BUG=http://dartbug.com/13024
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29362 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 14:45:59 +00:00
kustermann@google.com 94ebff2225 Bugfix in test.dart, adding of specialized test outcomes for analyzer
This CL will:
 - fix a bug in the legacy AnalyzerCommandOutputImpl class (in certain cases
   we did not report that the analyzer was missing a warning).
 - make the outcome of running the analyzer on a test be one of:
   * CompileTimeError
   * MissingCompileTimeError
   * StaticWarning
   * MissingStaticWarning
 - Make status file updates using the new Expectation markers
 - Remove support for '@static-clean':
     Previously running the analyer on a test could either result in
     'Pass' or in 'Fail'. The '@static-clean' annotation has been used
     as a (poor) mechanism to distinguish between errors and warnings.
     Having the 4 markers mentioned above means we can remove '@static-clean'
 - Remove 100 lines of rotted legacy code in our testing scripts.
 - Make a status file entry for every test that has analyzer errors or warnings

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29350 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 10:39:38 +00:00
zra@google.com 5572278a23 Changes to run tests on Dartium content shell on Android.
- In browser_controller.dart, adds a drtOnAndroid Browser.
- Adds flags for starting test servers at fixed ports.
  - This is needed so that android reverse port forwarding
    can be set up in advance.
- Adds setProp to android.dart to be used in lieu of
  environment variables when testing on Android.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29259 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 16:39:48 +00:00
ricow@google.com ba16679d74 Revert revision 27014 "Remove restriction on the number of IE processes running simultainiously"
I updated the comment to better reflect what our current status is.

R=kustermann@google.com

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

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