[dyn_modules] add snapshot target for faster iteration.
This adds a target for running pkg/dynamic_modules/test/runner/main.dart from an aot snapshot, useful when repeating runs for local iteration. I'm not including it with other build targets or using it in the test_matrix because each bot only runs this script once, so it doesn't provide much savings there. Change-Id: I20fe50a82d2a59aca6a0e697658b26b5b7da97c8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480744 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
committed by
Commit Queue
parent
4f407f18c0
commit
b87daa7351
@@ -14,12 +14,17 @@ import 'dart:ffi' show Abi;
|
||||
/// Note: we don't search for the directory "sdk" because this may not be
|
||||
/// available when running this test in a shard.
|
||||
Uri repoRoot = (() {
|
||||
var root = Platform.environment['REPO_ROOT'];
|
||||
if (root != null) return Uri.base.resolve(root);
|
||||
Uri script = Platform.script;
|
||||
var segments = script.pathSegments;
|
||||
var index = segments.lastIndexOf('pkg');
|
||||
if (index == -1) {
|
||||
exitCode = 1;
|
||||
throw "error: cannot find the root of the Dart SDK";
|
||||
index = segments.lastIndexOf(_outFolder); // running from snapshot
|
||||
if (index == -1) {
|
||||
exitCode = 1;
|
||||
throw "error: cannot find the root of the Dart SDK";
|
||||
}
|
||||
}
|
||||
return script.resolve("../" * (segments.length - index - 1));
|
||||
})();
|
||||
|
||||
@@ -17,3 +17,8 @@ aot_snapshot("dynamic_module_runner_snapshot") {
|
||||
[ "--dynamic-interface=" + rebase_path(
|
||||
"$_dart_root/utils/dynamic_module_runner/dynamic_interface.yaml") ]
|
||||
}
|
||||
|
||||
aot_snapshot("dynamic_modules_test_suite_snapshot") {
|
||||
main_dart = "../../pkg/dynamic_modules/test/runner/main.dart"
|
||||
name = "dynamic_modules_test_suite"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user