Commit Graph

19 Commits

Author SHA1 Message Date
Bob Nystrom 68dc77f456 Build DDC's SDK as part of the regular build.
This involves a few main pieces:

- Add code to the GN scripts to generate DDC's patched SDK and then
  compile it to summaries and JS in the build output directory.

- Add support to the underlying DDC build scripts to support controlling
  which files are built where.

- Update test.dart to use the DDC SDK from the build directory.

- Update create_sdk to use the built SDK instead of the checked in one.

- Fix various internal DDC tools to build their own copy of the SDK
  (since they can't easily find the one in the build directory because
  it's path if config-specific) and use those.

- Delete the checked DDC SDK JS and summaries.

I think I got everything working. The built Dart SDK looks fine -- it's
identical to one built using the old build scripts.

The various tools and DDC's little test runner I *think* work, but there
may be a bug or two in there. I tried the various things I could and it
seems like they work but it's hard to tell since they may be kind of
broken right now anyway.

Bug:
Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c
Reviewed-on: https://dart-review.googlesource.com/18144
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2017-11-20 23:24:07 +00:00
Bob Nystrom 24743461c9 Fix test.sh to not run non-existent shell script.
R=leafp@google.com

Review-Url: https://codereview.chromium.org/2964123002 .
2017-06-29 17:25:17 -07:00
Bob Nystrom 0b2c9b048d Dynamically load packages for dartdevc tests in test.dart.
This involves a few pieces:

- Add support to DDC for specifying the module name associated with a
  given summary. This lets test.dart invoke DDC using summaries in the
  build directory outside of the directory containing the test itself.

- Add support to the build scripts for building the packages. This adds
  a new GN target that builds everything needed to run test.dart with
  dartdevc. In particular, it invokes build_pkgs.dart to compile the
  relevant packages to JS+summary so that the tests can use them.

  This requires some changes to build_pkgs.dart so it can output to a
  given directory.

- In test.dart, when tests are compiled with dartdevc, pass in the
  summaries for the packages so they don't get compiled in. Then, when
  the test is run, configure require.js with the right paths to their
  JS files so they can be loaded.

  I also removed a bunch of unneeded buildDir parameters being passed
  around the various CompilerConfiguration class methods now that they
  have direct access to the configuration.

Fix #29923.

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

Review-Url: https://codereview.chromium.org/2955513002 .
2017-06-29 13:45:57 -07:00
Bob Nystrom 926df1e5b3 Rewrite build_pkgs.sh and build_test_pkgs.sh in Dart.
The bots need to run these before running the tests, so I'm porting them
to Dart so they'll run on Windows.

As a nice bonus, they're much faster now, I'm assuming because we use
one warmed up VM for all of the packages.

build_test_pkgs.sh on my machine went from ~12 seconds to ~4.

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

Review URL: https://codereview.chromium.org/2498673003 .
2016-11-15 11:14:37 -08:00
Vijay Menon 68d2121fd0 Use .packages instead of pubspec.yaml
This runs tests against sdk versions of packages instead of whatever
random version we have in pubspec.yaml.

Travis may be unhappy with the lack of a pubspec.yaml.  Here's the try:

https://travis-ci.org/dart-lang/sdk/builds/163270204

R=jmesserly@google.com, rnystrom@google.com

Review URL: https://codereview.chromium.org/2371113004 .
2016-09-28 09:49:31 -07:00
John Messerly 0aa5cbd128 fix #620, infer the input files from sources
also simplifies build of packages used by our tests
this caused a bunch of tests that use parts to start passing

R=nweiz@google.com

Review URL: https://codereview.chromium.org/2234343003 .
2016-08-11 13:19:36 -07:00
Andrew Krieger 5c9e1244bd Improve message in tool/test.sh
New message instructs developers to run tool/browser_test.sh in order to
actually run tests.

BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2100363002 .
2016-06-27 17:40:14 -07:00
Bob Nystrom 1e5b3af2e0 Move generated files to gen/.
- The generated SDK goes into gen/patched_sdk.
- Expanded multitests go into gen/codegen_tests.
- Compiled tests go into gen/codegen_output.

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1988503002 .
2016-05-18 13:48:10 -07:00
Jacob MacDonald 308fa5ccb4 Add bazel worker support to the dev compiler.
BUG=
R=jmesserly@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/1884073003 .
2016-04-15 06:51:40 -07:00
John Messerly b8d55ce95d add command test, fix relative paths
R=vsm@google.com

Review URL: https://codereview.chromium.org/1886393003 .
2016-04-14 12:35:05 -07:00
Vijay Menon a693930830 Roll analyzer to 0.27.2-alpha.1
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1641643004 .
2016-01-28 15:35:59 -08:00
Leaf Petersen 44f2cf3424 Bump the version number and re-baseline codegen/expect
BUG=
R=vsm@google.com

Review URL: https://codereview.chromium.org/1569783006 .
2016-01-08 13:29:08 -08:00
John Messerly 60aba749ca fixes #219, able to compile multiple entry points
also speeds up codegen_test by reusing the analysis context
BatchCompiler is pretty close to how analyzer_cli works now (other than missing features)

R=vsm@google.com

Review URL: https://codereview.chromium.org/1235503010.
2015-07-16 17:41:33 -07:00
John Messerly 8d76f5f34e have build/test scripts automatically update baselines
we already have to review them, so running a diff and failing the rest of the test pass seems unhelpful. Instead operate like our generated SDK does, and update in place

R=vsm@google.com

Review URL: https://codereview.chromium.org/1188173003.
2015-06-17 09:05:59 -07:00
John Messerly 92f7129ae3 split analyze and format steps out of test.sh
presubmit.sh still runs all of them in the same order

often I'd like to iterate on analyze or rerun format without running all of the tests, and find myself copying analyze or format lines from test.sh

R=leafp@google.com

Review URL: https://codereview.chromium.org/1167233002
2015-06-08 13:48:47 -07:00
Vijay Menon 4aaeaf6125 Remove dart backend
Fixes #205

R=jmesserly@google.com, leafp@google.com

Review URL: https://codereview.chromium.org/1148283010
2015-06-03 14:01:28 -07:00
John Messerly e15f53d923 upgrade dependencies, including migration to package:test
dart_style becomes a dev_dependency, and remove the ability to auto-run it from dart backend, instead use the test formatter
migrate to package:test, which has a few tricky bits:
* expect can only appear inside a test now (https://github.com/dart-lang/test/issues/132)
* mirrors is needed to get the test folder (https://github.com/dart-lang/test/issues/110)
* test `main` can't take arguments. not sure what's up there, but not a big deal for us either.

R=vsm@google.com

Review URL: https://codereview.chromium.org/1166683005
2015-06-01 14:54:13 -07:00
John Messerly db1d4fac75 reduce diff churn due to server_mode test
essentially verify the expected HTML in the test
this tripped on an interesting issue, we have two ways of computing MD5 hashes that produce different answers. I left that as a TODO.

R=jacobr@google.com

Review URL: https://codereview.chromium.org/1056613002
2015-04-01 13:49:11 -07:00
John Messerly 7cb01cb2a6 tweaks to build/test scripts
this is a follow up to reverted https://github.com/dart-lang/dev_compiler/pull/114
it relands it so it can pass on travis, with some additional tweaks to names

The new structure is:

    tool/
      presubmit.sh  # both build and test
      build_sdk.sh
      test.sh
      coverage.sh
    test/test.sh    # deprecated, with a warning message

Thoughts?

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1042863004
2015-03-30 12:52:03 -07:00