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

Unified Diff: tests/standalone/io/addlatexhash_test.dart

Issue 1746743002: Use checked-in .package file for building and testing (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Status fixes Created 4 years, 3 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 | « tests/compiler/dart2js/memory_compiler.dart ('k') | tests/standalone/io/code_collection_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/addlatexhash_test.dart
diff --git a/tests/standalone/io/addlatexhash_test.dart b/tests/standalone/io/addlatexhash_test.dart
index 582b75adfb3887b37f25483795e29495c39449cb..5c1c74046c400a18077cf5a1bdc2220f8fb2f0b1 100755
--- a/tests/standalone/io/addlatexhash_test.dart
+++ b/tests/standalone/io/addlatexhash_test.dart
@@ -13,6 +13,16 @@ final scriptDir = path.dirname(path.fromUri(Platform.script));
final dartRootDir = path.dirname(path.dirname(path.dirname(scriptDir)));
final dartRootPath = dartRootDir.toString();
+List<String> packageOptions() {
+ if (Platform.packageRoot != null) {
+ return <String>['--package-root=${Platform.packageRoot}'];
+ } else if (Platform.packageConfig != null) {
+ return <String>['--packages=${Platform.packageConfig}'];
+ } else {
+ return <String>[];
+ }
+}
+
// Check that the given ProcessResult indicates success; if so
// return the standard output, otherwise report the failure
checkAction(result, errorMessage) {
@@ -81,13 +91,13 @@ testSameHash(String tmpDirPath) {
// actions to take
runAddHash() {
- var args = [
- '--package-root=${Platform.packageRoot}',
+ var args = packageOptions();
+ args.addAll([
path.join(dartRootPath, "tools", "addlatexhash.dart"),
tmpPar8timesPath,
hashPath,
listPath
- ];
+ ]);
return Process.runSync(dartExecutable, args);
}
@@ -154,13 +164,13 @@ testSameDVI(String tmpDirPath) {
Process.runSync("latex", [fileName], workingDirectory: workingDirectory);
runAddHash() {
- var args = [
- '--package-root=${Platform.packageRoot}',
+ var args = packageOptions();
+ args.addAll([
path.join(dartRootPath, "tools", "addlatexhash.dart"),
tmpSpecPath,
hashPath,
listPath
- ];
+ ]);
return Process.runSync(dartExecutable, args);
}
« no previous file with comments | « tests/compiler/dart2js/memory_compiler.dart ('k') | tests/standalone/io/code_collection_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698