Commit Graph

1386 Commits

Author SHA1 Message Date
Siva Annamalai b583d74608 Add flutter_engine runtime to the test script so we can run standard dart tests from the test suite against the flutter engine on linux/x64
The test suite can be invoked as :
tools/test.py -rflutter --packages=<path_to_packages_dir>/.packages --flutter=<path_to_flutter_engine_workspace>/sky-shell --exclude-suite=pkg

Currently the sky_shell executable does not yet support the proper return
codes:
Success - 0
API error - 253
Compilation error - 254
Unhandled error - 255
Once this is fixed we can start running the tests against our
dart/flutter engine bleeding edge build bot.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2602783002 .
2017-01-05 14:41:27 -08:00
Asger Feldthaus 2e718613aa Add 'self_check' runtime for running self-checking unit tests
Some of the kernel unit tests can now be run using:

  tools/test.py -cdartk -rself_check language co19

This will search the pkg/ folder for files matching *_self_check.dart
and run each program with the compiled output as argument. If there is
no compiler, the test case itself is given as argument. These testers
are always run in batch-mode.

This type of test has no expected output, but is intended to check
itself by testing that certain invariants are not violated while
processing the given data set.

The 'self_check' runtime is not specifically tied to kernel,
although only kernel is using it at the moment.

There is also a new option --skip-compilation which skips the
compiler step.  It doesn't interact nicely with the status files,
but can still be useful for a quick offline test.

Current limitations:
- All self-check tests are treated as the same test case. If one fails,
  the remaining self-check testers don't run for that input.
- There is no way to run a subset of the self-check tests, or filter
  them based on what compiler was used.
- Tests that are expected to fail in the compiler show up as
  errors when skipping compilation.

BUG=
R=kustermann@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2549793002 .
2016-12-15 13:07:03 +01:00
Asger Feldthaus 31d5860c81 Enable strong-mode test suite for dartk.
This adds status files for skipping tests that are not yet strong, and
a status file with the tests that fail with the dartk-vm configuration.

To test:

  tools/test.py -cdartk --strong {language,lib,corelib}_strong

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2583453002 .
2016-12-15 12:50:08 +01:00
Martin Kustermann e9f0db2ba1 Start re-trying dartk compilations if they crash
Every crash of a dartk invocation will cause 1 more re-try. This is independent
of whether the crash was caused by the entire batch runner or just that single
compilation caused an exception.

The unfortunate side-effect of this is that ./tools/test.py will now print
warnings every time it retries the command.

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2576693002 .
2016-12-15 12:37:24 +01:00
Ryan Macnak 6051488ad9 Cleanup dead compiler and runtime aliases from the test framework.
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2570633002 .
2016-12-12 13:42:35 -08:00
Martin Kustermann 6a30db5997 Remove sub-errortype DartkMissingCompileTimeError: Since there is a very big overlap between missing CTEs from dartk and from dart_bootstrap
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2563983002 .
2016-12-09 10:55:03 +01:00
William Hesse 191184ba3d Remove dead code with analyzer warning in test scripts
BUG=

Review URL: https://codereview.chromium.org/2548773002 .
2016-12-02 11:29:45 +01:00
Ryan Macnak 1ebeb79942 Remove runtime 'dart_app' as it became identical to 'vm'.
Merge compiler 'dart2app' and 'dart2appjit' and rename to 'app_jit' since they came to mean the same thing.

Update status files to reflect these changes.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2541533004 .
2016-12-01 16:47:33 -08:00
Martin Kustermann abd77cab64 Refactor kernel-related status files
To make it clear in the status file whether a crash (or other issues) are coming
from the dartk compiler or from the vm, this CL introduces new status file
markers which are the normal markers prefixed with Dartk (e.g. DartkCrash).

Furthermore this CL groups common failures
  * compiler: dartk & dartkp
  * runtime: vm & dart_precompiled
into shared status file blocks, thereby deduplicating failures (which removes around 500 lines).

R=vegorov@google.com

Review URL: https://codereview.chromium.org/2543973002 .
2016-12-01 13:48:35 +01:00
Asger Feldthaus 04c66f8bab Support --strong when running dartk from test.py.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2536143003 .
2016-11-30 08:25:53 +01:00
William Hesse 6f7005ee71 Update status for co19 tests on browsers.
BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2538443002 .
2016-11-28 16:32:41 +01:00
Martin Kustermann aaec324001 Add more flags to the blacklist of reproduction commands
Currently failures on the buildbot will look for example like this:

Short reproduction command (experimental):
    python tools/test.py -cdartk -t120 --write-debug-log --write-test-outcome-log --copy-coredumps --exclude-suite pkg language/transitive_private_library_access_test

But developers only would like to see

    python tools/test.py -cdartk -t120 language/transitive_private_library_access_test

R=whesse@google.com

Review URL: https://codereview.chromium.org/2532123002 .
2016-11-28 14:18:27 +01:00
Asger Feldthaus 8f12489839 Add --verify-ir flag to dartk and test.py.
This replaces the old --sanity-check flag from dartk. Some files have
been renamed to avoid the wording "sanity check".

Compared to --sanity-check, the following checks have been added:
- variables are not referenced out of scope
- variables are not redeclared
- class type parameters are not referenced from static context

A unit test has been added to check that the verifier rejects certain
invalid ASTs.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2531873002 .
2016-11-28 12:21:19 +01:00
Martin Kustermann b1c04f0538 Avoid random stacktraces being printed from tools/test.py during test runs
Previously the testing script was just printing interleaved stack traces with
all the other output. Which means it's not associatable with a single test and
is highly confusing!

This CL associates the stack trace information of tests which time out to the
particular test which timed out.

R=whesse@google.com

Review URL: https://codereview.chromium.org/2524733004 .
2016-11-23 08:39:27 +01:00
Vyacheslav Egorov 2cb8640ac1 Kernel: fix -c dartkp -r dart_precompiled testing configuration.
Pass full snapshot path to the dart_precompiled_runtime executable.

BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2517243004 .
2016-11-22 19:34:58 +01:00
William Hesse 3e78c9bd31 Update test script short reproduction command to not print --packages flag.
Also run dartfmt on test_options.dart

BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2522513002 .
2016-11-21 18:27:11 +01:00
Martin Kustermann 13f7e93c7e Add wrapper shell script to invoke dartk with checked-in binary
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2516433004 .
2016-11-18 17:35:35 +01:00
Ryan Macnak 30517b2d1e Also push process_test when testing on Android hardware.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2505483002 .
2016-11-15 09:26:36 -08:00
Vyacheslav Egorov d96c11fcdd Emit patched_sdk in the root output directory.
Previously it was emitted in the directory used for intermediate files, which
is build system specific.

test.py script needs to locate patched_sdk thus its location must be aligned
between build systems.

Use checked in SDK if available and fallback on dart_boostrap if not available to speed up Debug builds

BUG=
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2469683002 .
2016-11-01 17:34:27 +01:00
Vyacheslav Egorov eb8c24e133 Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451623006 .
2016-10-27 10:09:22 +02:00
Vyacheslav Egorov 12968edb9c Revert "Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork.""
This reverts commit 4e7a31262e.

Windows bots are broken now.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2451893004 .
2016-10-26 17:07:18 +02:00
Vyacheslav Egorov 4e7a31262e Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This relands commit 2fed1c3905 with fixes to ensure that analyzer summaries are correctly created and XARM build does not try to use target binaries on the host.

R=zra@google.com
BUG=

Review URL: https://codereview.chromium.org/2453773002 .
2016-10-26 16:48:28 +02:00
Vyacheslav Egorov cf7ff42e60 Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork."
This reverts commit 2fed1c3905.

SDK builds are failing

TBR=zra@google.com

Review URL: https://codereview.chromium.org/2455593002 .
2016-10-26 13:06:27 +02:00
Vyacheslav Egorov 2fed1c3905 Merge more Kernel infrastructure from kernel_sdk SDK fork.
- bring patched SDK generation scripts and VM patch tweaks that allow VM patch files to be parsed by analyzer front-end;
  Patched SDK is an SDK with all VM patches spliced into it. Kernel compiler is based on the analyzer front-end which does
  not have any patch files support/model so for it to produce Kernel files that match VM we need to generate a such patched SDKs.

- bring test script modifications that allow to test Kernel pipeline

BUG=
R=asiva@google.com, kmillikin@google.com, whesse@google.com, zra@google.com

Review URL: https://codereview.chromium.org/2434123003 .
2016-10-26 13:02:54 +02:00
Siva Annamalai af4d246ef1 Cleanup options for use of application snapshots
- unified kAppAfterRun and kAppJITAfterRun to kAppJIT
 - adjusted the test configuration to make dart2app and dart2appjit to mean
   the same
 - delete GenerateFullSnapshot function as it is not used anymore

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2429023002 .
2016-10-19 17:42:01 -07:00
Florian Schneider b85f900cb7 test.dart: Push all required files to Android device when running AOT tests
Some tests have resources in sub-directories (e.g. certificates/)

Remove status file lines for tests that are now passing.

Fixes #26376,#26377.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2434123002 .
2016-10-19 16:50:23 -07:00
Ryan Macnak 572eb0ce7a Apparently co19 tests have their own separate annotation parsing.
Review URL: https://codereview.chromium.org/2419613007 .
2016-10-14 16:43:20 -07:00
Ryan Macnak 656964107b Update AOT Android harness for single-file app snapshots.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2419183002 .
2016-10-14 16:23:19 -07:00
Ryan Macnak fe04737a77 Add test directive to include other files used by a test in its compiled output directory.
Fixes #27591

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2423593002 .
2016-10-14 16:11:25 -07:00
Ryan Macnak 3d00ecdc8f Reapply "Use a single file for app snapshots."
- Don't read script to check for an app snapshot if it is a pipe. Fixes loading source from a pipe.
 - Fix windows and fushsia builds.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2416973003 .
2016-10-14 09:57:54 -07:00
Ryan Macnak 6839a23240 Revert "Use a single file for app snapshots."
This reverts commit 4f8b16df3b.

Review URL: https://codereview.chromium.org/2410303008 .
2016-10-13 15:29:23 -07:00
Ryan Macnak 4f8b16df3b Use a single file for app snapshots.
For blobs, put all four pieces into a single file with a header describing their offsets.
For dynamic libraries, move the vm isolate and isolate pieces into the dynamic library as additional read-only sections.

Automatically detect if the script argument is an app snapshot and initialize the VM appropriately, similar to automatic detection of script snapshots.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2405393002 .
2016-10-13 14:33:56 -07:00
John McCutchan 1937854112 Only collect 1 stack trace when a test timeouts on mac
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org/2383553002 .
2016-09-29 08:30:48 -07:00
John McCutchan e434d3daab Attempt to print the stack traces of hung test processes on MacOS.
/usr/bin/sample is a standard tool installed on all MacOS machines.

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2371383005 .
2016-09-28 13:39:54 -07:00
John McCutchan 74ee4ea047 Fix handling of co19 syntax error tests using the @compile-error tag and reload bots
BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2369633002 .
2016-09-23 14:26:22 -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 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 61eee9ee52 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

BUG=https://github.com/dart-lang/sdk/issues/23565
R=rnystrom@google.com

Committed: https://github.com/dart-lang/sdk/commit/5d3e356ca75be8aeff3efde5df946d746b9f8352

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

Reverted: https://github.com/dart-lang/sdk/commit/6d238ba197c8bda71afe790f16f6e9adaf7abd13
2016-09-16 15:03:18 +02:00
William Hesse 34b7fd39dc Avoid error in testing script if environment is empty.
BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2344903002 .
2016-09-15 18:29:38 +02:00
Rico Wind c1efad95c4 Remove ricow@ from failure print out
BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org/2346803002 .
2016-09-15 16:05:48 +02:00
William Hesse 6d238ba197 Revert "Use checked-in .package file for building and testing"
This reverts commit 5d3e356ca7.

BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2340813004 .
2016-09-15 15:46:49 +02:00
William Hesse 5d3e356ca7 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

BUG=https://github.com/dart-lang/sdk/issues/23565
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1746743002 .
2016-09-15 14:50:30 +02:00
Florian Schneider 30f16437b1 test.dart: Print stack traces of all threads when a test times out
This helps diagnosing tests timing out when running test.py.

BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org/2320473004 .
2016-09-08 10:49:15 -07:00
Sigmund Cherem 6b3357d848 Pass the flag in test_suite. I'm not super familiar with this code, but I'm
copying what I see for the cps-ir flag. Turns out we were not passing the flag
when running the html tests.

BUG=

Review URL: https://codereview.chromium.org/2284793002 .
2016-08-26 10:19:49 -07:00
William Hesse 25840473a5 Add --fast-startup flag to test.py
BUG=https://github.com/dart-lang/sdk/issues/27085

Review URL: https://codereview.chromium.org/2281773002 .
2016-08-26 01:56:20 +02:00
William Hesse fda21e2b9a Add relative path to test when creating generated multitest directory
BUG=https://github.com/dart-lang/sdk/issues/27139
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2270413002 .
2016-08-24 14:16:22 +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
Sigmund Cherem 2ee3b9fae6 Delete site/try
R=het@google.com, whesse@google.com

Review URL: https://codereview.chromium.org/2232273004 .
2016-08-15 12:14:45 -07: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
Aleksei Semenov c9081ea4df initial support for running tests against dart analyzer in strong mode (#27033) 2016-08-09 10:58:15 +02:00