Skip to content

Commit b374d42

Browse files
rmacnak-googleCommit Queue
authored andcommitted
Revert "[test_runner] Use relative paths in commands."
This reverts commit 1b4a566. Reason for revert: breaks Fuchsia builders Original change's description: > [test_runner] Use relative paths in commands. > > This makes it easier to copy commands between checkouts or between the bot and local development. > > Change-Id: I74bc9dcb83855e295fe40fa4ef81871ccc537d29 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400180 > Reviewed-by: Alexander Aprelev <[email protected]> > Commit-Queue: Ryan Macnak <[email protected]> No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I8c7cca1e9c82a5b6e237d0b7611647a6168e6397 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437123 Reviewed-by: Siva Annamalai <[email protected]> Auto-Submit: Ryan Macnak <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent 98f233b commit b374d42

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

pkg/test_runner/lib/src/compiler_configuration.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,8 @@ abstract mixin class VMKernelCompilerMixin {
14281428

14291429
Command computeCompileToKernelCommand(String tempDir, List<String> arguments,
14301430
Map<String, String> environmentOverrides) {
1431-
var genKernel = 'pkg/vm/tool/gen_kernel$shellScriptExtension';
1431+
var pkgVmDir = Platform.script.resolve('../../../pkg/vm').toFilePath();
1432+
var genKernel = '$pkgVmDir/tool/gen_kernel$shellScriptExtension';
14321433

14331434
var kernelBinariesFolder = _configuration.buildDirectory;
14341435
if (_useSdk) {

pkg/test_runner/lib/src/test_suite.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ abstract class TestSuite {
226226

227227
TestUtils.mkdirRecursive(Path('.'), generatedTestPath);
228228
return File(generatedTestPath.toNativePath())
229+
.absolute
229230
.path
230231
.replaceAll('\\', '/');
231232
}
@@ -343,7 +344,7 @@ class VMTestSuite extends TestSuite {
343344
configuration.architecture == Architecture.x64c
344345
? '$buildDir/gen/kernel-service.dart.snapshot'
345346
: '$buildDir/gen/kernel_service.dill';
346-
var dfePath = Path(filename).toNativePath();
347+
var dfePath = Path(filename).absolute.toNativePath();
347348
final experiments = [...configuration.experiments];
348349
var args = [
349350
...initialTargetArguments,
@@ -954,7 +955,8 @@ class StandardTestSuite extends TestSuite {
954955
var nameFromModuleRoot = testFile.path.relativeTo(Repository.dir);
955956
var nameFromModuleRootNoExt =
956957
"${nameFromModuleRoot.directoryPath}/$nameNoExt";
957-
var jsDir = Path(compilationTempDir).toString();
958+
var jsDir =
959+
Path(compilationTempDir).relativeTo(Repository.dir).toString();
958960
var nativeNonNullAsserts =
959961
testFile.ddcOptions.contains('--native-null-assertions');
960962
var jsInteropNonNullAsserts =
@@ -1030,16 +1032,15 @@ class StandardTestSuite extends TestSuite {
10301032
args.add('--format=json');
10311033
}
10321034

1033-
args.add(testFile.path.relativeTo(Repository.dir).toNativePath());
1035+
args.add(testFile.path.toNativePath());
10341036

10351037
return args;
10361038
}
10371039

10381040
String? packagesArgument(String? packages) {
10391041
// If this test is inside a package, we will check if there is a
10401042
// pubspec.yaml file and if so, create a custom package root for it.
1041-
packages ??=
1042-
Path(configuration.packages).relativeTo(Repository.dir).toNativePath();
1043+
packages ??= Path(configuration.packages).toNativePath();
10431044

10441045
if (packages == 'none') {
10451046
return null;

tests/standalone/io/process_non_ascii_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,12 @@ main() {
2626
var nonAsciiTxtFile = new File('${nonAsciiDir.path}/æøå.txt');
2727
nonAsciiTxtFile.writeAsStringSync('æøå');
2828
var script = nonAsciiFile.path;
29-
var absolutePackages = Uri.parse(Platform.packageConfig!).toFilePath();
3029
// Note: we prevent this child process from using Crashpad handler because
3130
// this introduces an issue with deleting the temporary directory.
3231
Process.run(
3332
executable,
3433
[]
3534
..addAll(Platform.executableArguments)
36-
..add("--packages=$absolutePackages")
3735
..add(script),
3836
workingDirectory: nonAsciiDir.path,
3937
environment: {'DART_CRASHPAD_HANDLER': ''},

tests/standalone/io/regress_7679_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ main() {
3535
}
3636
""");
3737
String executable = new File(Platform.executable).resolveSymbolicLinksSync();
38-
String absolutePackages = Uri.parse(Platform.packageConfig!).toFilePath();
3938
// Note: we prevent this child process from using Crashpad handler because
4039
// this introduces an issue with deleting the temporary directory.
4140
Process.run(
4241
executable,
4342
[]
4443
..addAll(Platform.executableArguments)
45-
..add("--packages=$absolutePackages")
4644
..add('script.dart'),
4745
workingDirectory: temp.path,
4846
environment: {'DART_CRASHPAD_HANDLER': ''},

0 commit comments

Comments
 (0)