mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Make the fasta tool use Platform.resolvedExecutable when tested.
Change-Id: Ie83cd4692898c1b6e585ed5d47fc55be4d60c272 Reviewed-on: https://dart-review.googlesource.com/35162 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Peter von der Ahé <ahe@google.com>
This commit is contained in:
parent
94fc11388a
commit
e7ac35dfc9
|
@ -144,10 +144,17 @@ Error: No Dart file specified.
|
|||
|
||||
for (String subtool in testedSubtools) {
|
||||
print("Testing $subtool");
|
||||
ProcessResult result =
|
||||
Process.runSync("/bin/bash", <String>[toolPath, subtool]);
|
||||
ProcessResult result = Process.runSync(
|
||||
"/bin/bash", <String>[toolPath, subtool],
|
||||
environment: <String, String>{"DART_VM": Platform.resolvedExecutable});
|
||||
Map expectation = expectations.remove(subtool);
|
||||
Expect.equals(expectation["exitCode"], result.exitCode);
|
||||
String combinedOutput = """
|
||||
stdout:
|
||||
${result.stdout}
|
||||
stderr:
|
||||
${result.stderr}
|
||||
""";
|
||||
Expect.equals(expectation["exitCode"], result.exitCode, combinedOutput);
|
||||
|
||||
switch (subtool) {
|
||||
case "scanner":
|
||||
|
|
|
@ -10,7 +10,7 @@ set -e
|
|||
|
||||
REPO_DIR="$(cd ${BASH_SOURCE%/*} && git rev-parse --show-toplevel)"
|
||||
|
||||
DART_VM="${REPO_DIR}/sdk/bin/dart"
|
||||
DART_VM=${DART_VM-"${REPO_DIR}/sdk/bin/dart"}
|
||||
|
||||
TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta"
|
||||
|
||||
|
|
Loading…
Reference in a new issue