dart-sdk/tests/README
Robert Nystrom 99e8a9fba5 Move the test runner (i.e. "test.dart"/"test.py") to pkg/.
This makes it an actual Pub package like most other code inside the SDK
repo. The main goal is to make it easier to write tests for the test
runner itself.

This change:

- Moves all of the code from tools/testing/dart/ over to
  pkg/test_runner. Most of it ends up under test_runner/lib/src.

- Move tools/testing/dart/main.dart to
  pkg/test_runner/bin/test_runner.dart.

- Move standalone_2/io/test_runner_test.dart to
  pkg/test_runner/test/test_runner_test.dart. I don't think it currently
  works, but it wasn't being run in its old location either.

- Add test_runner to the analysis-server bot. This ensures the
  test_runner package is static error clean.

- Remove standalone_2/io/test_runner_analyze_test.dart which used to
  attempt to do the above and is no longer needed.

- Update test.py to look for the test runner at its new location.

- Add test_runner to the repo .packages file and remove the weird
  test_dart pseudo-package. (I think this fixes #35279.)

- Remove status file entries for the removed standalone_2 tests.

There are no code changes to the test runner itself aside from fixing
up import paths.

Change-Id: I3d05d50d222b291848fa5a30de2846e803bc81e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105821
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-06-14 23:35:10 +00:00

43 lines
873 B
Text

Run Existing Tests
==================
See the output of
../tools/test.py --help
for how to run tests.
See also
https://code.google.com/p/dart/wiki/Building#Testing
for detailed examples.
Create New Tests
================
See comments above
factory StandardTestSuite.forDirectory
in
../pkg/test_runner/lib/src/test_suite.dart
for the default test directory layout. By default test-file names must
end in "_test.dart", but some test suites, such as ./co19, subclass
StandardTestSuite and override this default.
See comments at the beginning of
../pkg/test_runner/lib/src/multitest.dart
for how to create tests that pass by failing with a known error. For
example,
...
int x = "not an int"; //# 01: static type warning
...
as part of a test will only pass the "--compiler dart2analyzer" test if
the assignment generates a static type warning.