Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions testing/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,10 +1037,11 @@ def run_impeller_golden_tests(build_dir: str):
).joinpath('golden_tests_harvester')
with tempfile.TemporaryDirectory(prefix='impeller_golden') as temp_dir:
run_cmd([tests_path, f'--working_dir={temp_dir}'], cwd=build_dir)
dart_bin = os.path.join(build_dir, 'dart-sdk', 'bin', 'dart')
golden_path = os.path.join('testing', 'impeller_golden_tests_output.txt')
script_path = os.path.join('tools', 'dir_contents_diff', 'bin', 'dir_contents_diff.dart')
diff_result = subprocess.run(
f'dart run {script_path} {golden_path} {temp_dir}',
f'{dart_bin} run {script_path} {golden_path} {temp_dir}',
check=False,
shell=True,
stdout=subprocess.PIPE,
Expand All @@ -1052,9 +1053,8 @@ def run_impeller_golden_tests(build_dir: str):
raise RuntimeError('impeller_golden_tests diff failure')

with DirectoryChange(harvester_path):
run_cmd(['dart', 'pub', 'get'])
bin_path = Path('.').joinpath('bin').joinpath('golden_tests_harvester.dart')
run_cmd(['dart', 'run', str(bin_path), temp_dir])
run_cmd([dart_bin, 'run', str(bin_path), temp_dir])


def main():
Expand Down
7 changes: 5 additions & 2 deletions tools/dir_contents_diff/test/dir_contents_diff_test.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:io' as io;

import 'package:litetest/litetest.dart';
Expand All @@ -19,11 +23,10 @@ void main() {
return;
}


// Runs `../bin/dir_contents_diff.dart` with the given arguments.
(int, String) runSync(String goldenPath, String dirPath) {
final io.ProcessResult result = io.Process.runSync(
'dart',
io.Platform.resolvedExecutable,
<String>[binPath, goldenPath, dirPath],
);
return (result.exitCode, result.stdout ?? result.stderr);
Expand Down