Merge pull request #15333 from carlocab/test-runner-debug

determine-test-runners: add debug output
This commit is contained in:
Carlo Cabrera 2023-04-29 11:52:27 +08:00 committed by GitHub
commit aec05e6b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -42,6 +42,8 @@ module Homebrew
runner_matrix = GitHubRunnerMatrix.new(testing_formulae, deleted_formulae, dependent_matrix: args.dependents?)
runners = runner_matrix.active_runner_specs_hash
ohai "Runners", JSON.pretty_generate(runners)
github_output = ENV.fetch("GITHUB_OUTPUT")
File.open(github_output, "a") do |f|
f.puts("runners=#{runners.to_json}")

View File

@ -41,8 +41,7 @@ describe "brew determine-test-runners" do
setup_test_formula "testball"
expect { brew "determine-test-runners", "testball", runner_env.merge({ "GITHUB_OUTPUT" => github_output }) }
.to not_to_output.to_stdout
.and not_to_output.to_stderr
.to not_to_output.to_stderr
.and be_a_success
expect(File.read(github_output)).not_to be_empty