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:
Peter von der Ahé 2018-01-17 10:26:08 +00:00 committed by commit-bot@chromium.org
parent 94fc11388a
commit e7ac35dfc9
2 changed files with 11 additions and 4 deletions

View file

@ -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":

View file

@ -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"