-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-14949: [CI][Release] Output script's stdout on failure
- Loading branch information
Showing
3 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,9 @@ def prepare(*targets) | |
def test_linux_packages | ||
user = "Arrow Developers" | ||
email = "[email protected]" | ||
prepare("LINUX_PACKAGES", "DEBFULLNAME" => user, "DEBEMAIL" => email) | ||
stdout = prepare("LINUX_PACKAGES", | ||
"DEBFULLNAME" => user, | ||
"DEBEMAIL" => email) | ||
changes = parse_patch(git("log", "-n", "1", "-p")) | ||
sampled_changes = changes.collect do |change| | ||
{ | ||
|
@@ -91,7 +93,7 @@ def test_linux_packages | |
], | ||
}, | ||
] | ||
assert_equal(expected_changes, sampled_changes) | ||
assert_equal(expected_changes, sampled_changes, "Output:\n#{stdout}") | ||
end | ||
|
||
def test_version_pre_tag | ||
|
@@ -273,8 +275,9 @@ def test_version_pre_tag | |
} | ||
end | ||
|
||
prepare("VERSION_PRE_TAG") | ||
stdout = prepare("VERSION_PRE_TAG") | ||
assert_equal(expected_changes.sort_by {|diff| diff[:path]}, | ||
parse_patch(git("log", "-n", "1", "-p"))) | ||
parse_patch(git("log", "-n", "1", "-p")), | ||
"Output:\n#{stdout}") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ def bump_versions(*targets) | |
else | ||
additional_env = {} | ||
end | ||
env = { "BUMP_DEFAULT" => "0" } | ||
env = {"BUMP_DEFAULT" => "0"} | ||
targets.each do |target| | ||
env["BUMP_#{target}"] = "1" | ||
end | ||
|
@@ -259,13 +259,14 @@ def test_version_post_tag | |
} | ||
end | ||
|
||
bump_versions("VERSION_POST_TAG") | ||
stdout = bump_versions("VERSION_POST_TAG") | ||
assert_equal(expected_changes.sort_by {|diff| diff[:path]}, | ||
parse_patch(git("log", "-n", "1", "-p"))) | ||
parse_patch(git("log", "-n", "1", "-p")), | ||
"Output:\n#{stdout}") | ||
end | ||
|
||
def test_deb_package_names | ||
bump_versions("DEB_PACKAGE_NAMES") | ||
stdout = bump_versions("DEB_PACKAGE_NAMES") | ||
changes = parse_patch(git("log", "-n", "1", "-p")) | ||
sampled_changes = changes.collect do |change| | ||
first_hunk = change[:hunks][0] | ||
|
@@ -299,15 +300,15 @@ def test_deb_package_names | |
path: "dev/tasks/tasks.yml", | ||
}, | ||
] | ||
assert_equal(expected_changes, sampled_changes) | ||
assert_equal(expected_changes, sampled_changes, "Output:\n#{stdout}") | ||
end | ||
|
||
def test_linux_packages | ||
name = "Arrow Developers" | ||
email = "[email protected]" | ||
bump_versions("LINUX_PACKAGES", | ||
"DEBFULLNAME" => name, | ||
"DEBEMAIL" => email) | ||
stdout = bump_versions("LINUX_PACKAGES", | ||
"DEBFULLNAME" => name, | ||
"DEBEMAIL" => email) | ||
|
||
release_time_string = git("log", | ||
"--format=%aI", | ||
|
@@ -367,6 +368,7 @@ def test_linux_packages | |
}, | ||
] | ||
assert_equal(expected_changes, | ||
parse_patch(git("log", "-n", "1", "-p"))) | ||
parse_patch(git("log", "-n", "1", "-p")), | ||
"Output:\n#{stdout}") | ||
end | ||
end |