Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(694)

Unified Diff: pkg/front_end/lib/src/fasta/TESTING.md

Issue 2737403002: Document how to test after making changes to Fasta. (Closed)
Patch Set: Document how to test after making changes to Fasta. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/README.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/TESTING.md
diff --git a/pkg/front_end/lib/src/fasta/TESTING.md b/pkg/front_end/lib/src/fasta/TESTING.md
new file mode 100644
index 0000000000000000000000000000000000000000..c8665abb742cc03142d2528ae765dd16ca04b99c
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/TESTING.md
@@ -0,0 +1,45 @@
+<!--
+Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+# How to test Fasta
+
+When changing Fasta, your changes can affect dart2js or the VM, so you may need
+to test them.
+
+<!-- TODO(ahe): Soon, also the analyzer. -->
+
+## Test package:front_end and package:analyzer.
+
+The absolutely bare minimum of testing is the basic unit tests:
+
+```
+./tools/test.py -mrelease 'pkg/front_end|*fasta*' --checked --time -pcolor --report --failure-summary
+```
+
+## Testing dart2js
+
+If you're making changes to dart2js, it most likely involves the scanner or parser (at least for now). In that case, you should run dart2js' unit tests (the test suite called dart2js) as well as language and co19.
+
+```
+# Unit tests for dart2js
+./tools/test.py --dart2js-batch --time -pcolor --report --failure-summary -ax64 -mrelease --checked dart2js
+
+# Language and co19, dart2js.
+./tools/test.py --dart2js-batch --time -pcolor --report --failure-summary -ax64 -mrelease -cdart2js -rd8 language co19
+```
+
+## Testing the Dart VM
+
+If you're making changes that affect Kernel output, for example, BodyBuilder.dart, you probably also need to test on the VM:
+
+```
+# Language, co19, kernel, for VM using Fasta.
+./tools/build.py -mrelease runtime_kernel && ./tools/test.py -mrelease -cdartk co19 language kernel --time -pcolor --report --failure-summary -j16
+```
+
+
+Notice that the option is -cdartk, but it is actually Fasta. Not dartk.
+
+If you're running on a Mac, it's important that you use the -j option with test.py. It defaults to the number of cores on your machine (including hyper-threads), and for Linux that works fine. But Macs don't seem to be able to run as many processes in parallel. On a Mac Pro with 24 threads, using -j16 seems optimal.
« no previous file with comments | « pkg/front_end/lib/src/fasta/README.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698