diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-12-04 09:33:10 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-12-04 10:05:05 +0200 |
commit | cae923a2acacf9717c75b0586f9b901947441210 (patch) | |
tree | bbb8bcbba350d0da93feae45adc9f240f05b0aa6 | |
parent | 9d67d2d8b2f214750b1fcf3b5418c4efde7f6714 (diff) | |
download | aiaiai-cae923a2acacf9717c75b0586f9b901947441210.tar.gz |
test-patchset: improve build failure output
The previous patch made it acceptable for the base commit to fail. However, the
e-mail message we generate in this case contained something like:
"Failed to build the following commit for configuration ..."
which is not too readable, because it does not make it clear that this is the
base commit which fails to compile.
This patch improves the output and makes it look like this:
"Failed to build base commit ..."
This is just a bit nicer.
Additionally, when the base commit fails, and the first patch fixes it, the
resulting build diff is rather messy. This patch makes aiaiai-test-patchset
print a short explanation for the messy build diff.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | aiaiai-sh-functions | 9 | ||||
-rwxr-xr-x | aiaiai-test-patchset | 16 |
2 files changed, 18 insertions, 7 deletions
diff --git a/aiaiai-sh-functions b/aiaiai-sh-functions index 57fe04d..7666056 100644 --- a/aiaiai-sh-functions +++ b/aiaiai-sh-functions @@ -135,18 +135,19 @@ __print_build_log() local config="$(leave_first "$1")"; local arch="$(leave_second "$1")"; shift local commit_id="$1"; shift + local commit_info="$(git log -1 --oneline "$commit_id")" + local commit_nickname="${1:-""}" cat <<EOF -Failed to build the following commit for configuration "$config"${arch:+ "(architecture $arch)"}": - -$(git log -1 --oneline "$commit_id") +Failed to build $commit_nickname: $commit_info +Configuration: "$config"${arch:+", architecture $arch"}". $(cat) EOF } # Format a build failure report. -# Usage: build_failure <defconfig> <commit_id> < <build_log> +# Usage: build_failure <defconfig> <commit_id> <commit_nickname> < <build_log> build_failure() { # The build log might have been generated with multiple jobs which diff --git a/aiaiai-test-patchset b/aiaiai-test-patchset index 3e82b73..7ef44a7 100755 --- a/aiaiai-test-patchset +++ b/aiaiai-test-patchset @@ -454,8 +454,10 @@ for defconfig in $defconfigs; do print_separator # Make kernel appends a "FAILURE" string at the end when builds fail + base_commit_failed="" if build_failed "$log1"; then - build_failure "$defconfig" "$commit_id1" < "$log1" + build_failure "$defconfig" "$commit_id1" "the base commit" < "$log1" + base_commit_failed="yes" print_separator fi @@ -472,10 +474,18 @@ for defconfig in $defconfigs; do fi if [ -s "$tmpdir/$defconfig.stderr.diff" ]; then - printf "\n%s\n\n" "Successfully built configuration \"$defconfig\", results:" + printf "\n%s\n" "Successfully built configuration \"$defconfig\", the resulting" + printf "%s" "build diff " + + if [ -n "$base_commit_failed" ]; then + printf "%s\n\n" "is rather messy because the base commit failed to build:" + else + printf "%s\n\n", "is:" + fi + cat "$tmpdir/$defconfig.stderr.diff" else - printf "\n%s\n" "Successfully built configuration \"$defconfig\", no issues" + printf "\n%s\n" "Successfully built configuration \"$defconfig\", no issues." fi done; |