Em Fri, Jun 06, 2014 at 04:50:23PM +0200, Jiri Olsa escreveu:
> On Fri, Jun 06, 2014 at 11:11:49AM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <[email protected]>
> > +++ b/tools/perf/tests/make
> > @@ -205,8 +205,7 @@ $(run):
> >     ( eval $$cmd ) >> $@ 2>&1; \
> >     echo "  test: $(call test,$@)" >> $@ 2>&1; \
> >     $(call test,$@) && \
> > -   rm -f $@ \
> > -   rm -rf $$TMP_DEST
> > +   rm -rf $@ $$TMP_DEST || cat $@
 
> I like that we show the log, but we need to fail the target
> so the processing is stopped and the rest is not executed,
> like adding this:
 
>     .... cat $@ && false
  
> >  $(run_O):
> >     $(call clean)
 
> also you need to put same change to $(run_O) target

Updated patch:

commit 40cb3da56c614bb3ea42ce4b99e379859d8be9a5
Author: Arnaldo Carvalho de Melo <[email protected]>
Date:   Thu Jun 5 17:15:47 2014 -0300

    perf tests: Show the inner make output when an error happens
    
    Before:
    
      [acme@zoo linux]$ make -C tools/perf -f tests/make make_static
      make: Entering directory `/home/git/linux/tools/perf'
      - make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.JcWuM4Zu9f 
LDFLAGS=-static
      make: *** [make_static] Error 1
      make: Leaving directory `/home/git/linux/tools/perf'
      [acme@zoo linux]$
    
    After:
    
      [acme@zoo linux]$ make -C tools/perf -f tests/make make_static
      make: Entering directory `/home/git/linux/tools/perf'
      - make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u 
LDFLAGS=-static
      cd . && make -f Makefile DESTDIR=/tmp/tmp.X3su83i14u LDFLAGS=-static
        BUILD:   Doing 'make -j4' parallel build
      config/Makefile:303: *** No static glibc found, please install 
glibc-static.  Stop.
      make[1]: *** [all] Error 2
        test: test -x ./perf
      make: Leaving directory `/home/git/linux/tools/perf'
      [acme@zoo linux]$
    
    Cc: Adrian Hunter <[email protected]>
    Cc: David Ahern <[email protected]>
    Cc: Don Zickus <[email protected]>
    Cc: Frederic Weisbecker <[email protected]>
    Cc: Ingo Molnar <[email protected]>
    Cc: Mike Galbraith <[email protected]>
    Cc: Namhyung Kim <[email protected]>
    Cc: Paul Mackerras <[email protected]>
    Cc: Peter Zijlstra <[email protected]>
    Cc: Stephane Eranian <[email protected]>
    Link: http://lkml.kernel.org/n/[email protected]
    Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>

diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 2f92d6e7ee00..69a71ff84e01 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -205,8 +205,7 @@ $(run):
        ( eval $$cmd ) >> $@ 2>&1; \
        echo "  test: $(call test,$@)" >> $@ 2>&1; \
        $(call test,$@) && \
-       rm -f $@ \
-       rm -rf $$TMP_DEST
+       rm -rf $@ $$TMP_DEST || (cat $@ ; false)
 
 $(run_O):
        $(call clean)
@@ -217,9 +216,7 @@ $(run_O):
        ( eval $$cmd ) >> $@ 2>&1 && \
        echo "  test: $(call test_O,$@)" >> $@ 2>&1; \
        $(call test_O,$@) && \
-       rm -f $@ && \
-       rm -rf $$TMP_O \
-       rm -rf $$TMP_DEST
+       rm -rf $@ $$TMP_O $$TMP_DEST || (cat $@ ; false)
 
 tarpkg:
        @cmd="$(PERF)/tests/perf-targz-src-pkg $(PERF)"; \
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to