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

Unified Diff: test/real_version_test.dart

Issue 1145993003: Fix asset and SDK path detection. (Closed) Base URL: git@github.com:dart-lang/pub_test@master
Patch Set: Code review changes Created 5 years, 7 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 | « lib/src/utils.dart ('k') | test/test_pub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/real_version_test.dart
diff --git a/test/real_version_test.dart b/test/real_version_test.dart
index a84f746fb8fd6e57550587a6f12be6329e039b87..97138087de49fe4b209f9b55f545314187429aa6 100644
--- a/test/real_version_test.dart
+++ b/test/real_version_test.dart
@@ -11,6 +11,7 @@ import 'package:scheduled_test/scheduled_process.dart';
import 'package:scheduled_test/scheduled_test.dart';
import '../lib/src/exit_codes.dart' as exit_codes;
+import '../lib/src/sdk.dart' as sdk;
import 'test_pub.dart';
main() {
@@ -27,10 +28,8 @@ main() {
// in the built SDK's "bin" directory. Note also that this invokes pub from
// the built SDK directory, and not the live pub code directly in the repo.
integration('parse the real SDK "version" file', () {
- // Get the path to the pub binary in the SDK. Note that we can't use
- // sdk.rootDirectory here because that assumes the entrypoint Dart script
- // being run is pub itself. Here, the entrypoint is this test file.
- var pubPath = path.join(path.dirname(Platform.executable),
+ // Get the path to the pub binary in the SDK.
+ var pubPath = path.join(sdk.rootDirectory, 'bin',
Platform.operatingSystem == "windows" ? "pub.bat" : "pub");
var pub = new ScheduledProcess.start(pubPath, ['version']);
« no previous file with comments | « lib/src/utils.dart ('k') | test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698