]> www.infradead.org Git - users/dedekind/aiaiai.git/commitdiff
test-patchset: improve build failure output
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 4 Dec 2013 07:33:10 +0000 (09:33 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 4 Dec 2013 08:05:05 +0000 (10:05 +0200)
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>
aiaiai-sh-functions
aiaiai-test-patchset

index 57fe04d7495a56299c5a040821201b65b09a4a81..766605617a8deed15f692eae09773fdf25acff72 100644 (file)
@@ -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
index 3e82b73deaa2d0f13602a4a79bb88f1aeb3202de..7ef44a7099ced9ba6b5d2d303fa0396eb5107a64 100755 (executable)
@@ -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;