diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-03-21 14:25:08 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-21 14:25:08 +0100 |
| commit | 7c9c9fd24f0a02c137b8f438a48c2d69210bfdd1 (patch) | |
| tree | f4a809567f9af45968e88fc0989216c08bda8f87 /pkg | |
| parent | a9007a8ccb8f779524027804cd6c991546e0ac57 (diff) | |
pkg/build: add a test for build failure root causing
Such error popped up during bisection on older kernels.
It's already detected properly, yet build failed with just "make failed"...
Unclear why that happened, but the test won't harm.
Update #501
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/build/build_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/build/build_test.go b/pkg/build/build_test.go index 830c4f39c..3900dfaf7 100644 --- a/pkg/build/build_test.go +++ b/pkg/build/build_test.go @@ -37,6 +37,7 @@ func TestCompilerIdentity(t *testing.T) { } func TestExtractRootCause(t *testing.T) { + // nolint: lll for _, s := range []struct{ e, expect string }{ {` cc -g -Werror db_break.c @@ -51,6 +52,20 @@ int kcov_cold = 1; `, "sys/dev/kcov.c:93:6: error: use of undeclared identifier 'kcov_cold123'; did you mean 'kcov_cold'?", }, + {` + CC /tools/objtool/parse-options.o +In file included from ./scripts/gcc-plugins/gcc-common.h:119:0, + from <stdin>:1: +/gcc-5.5.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.5.0/plugin/include/builtins.h:23:17: fatal error: mpc.h: No such file or directory +compilation terminated. +Cannot use CONFIG_GCC_PLUGINS: your gcc installation does not support plugins, perhaps the necessary headers are missing? +scripts/Makefile.gcc-plugins:51: recipe for target 'gcc-plugins-check' failed +make: *** [gcc-plugins-check] Error 1 +make: *** Waiting for unfinished jobs.... + UPD include/config/kernel.release +`, + "/gcc-5.5.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.5.0/plugin/include/builtins.h:23:17: fatal error: mpc.h: No such file or directory", + }, } { got := extractCauseInner([]byte(s.e)) if !bytes.Equal([]byte(s.expect), got) { |
