tests: expose bug#12554 (false positives for presence of '-k' make option)
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 2 Oct 2012 19:27:28 +0000 (21:27 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 29 Apr 2013 14:16:31 +0000 (16:16 +0200)
commitcbf23cebcb8fdeb02b5a69a6741af2507d3ded57
tree09bb3a949605aa7715cb6a118e319062440de5d1
parent3fd147d8cf435e337bc9c6270da23633993967cf
tests: expose bug#12554 (false positives for presence of '-k' make option)

The current implementation of the code descending into $(SUBDIRS)
entries uses the following snippet to decide whether make is running
with the '-k' a.k.a. '--keep-going' option, and thus whether a failure
in a subdirectory should prevent the descent in the following ones:

    fail= failcom='exit 1'; \
    for f in x $$MAKEFLAGS; do \
      case $$f in \
        *=* | --[!k]*);; \
        *k*) failcom='fail=yes';; \
      esac; \
    done

It's clear that the second pattern in the 'case' construct can possibly
match false positives, for examples in these two cases:

    make check TESTS="x.test k.test"
    make -I /usr/local/kool-fragments

which are somewhat unusual, but not invalid.  So we need a more resilient
implementation, as we did for the detection of the '-n' flag.

But alas, such an implementation seems quite tricky to obtain in portable
make.  So for the moment we content ourselves with exposing the bug, with
the hope of being able to fix soon enough.

* t/subdir-keep-going-pr12554.sh: New test.
* t/list-of-tests.mk (handwritten_TESTS, XFAIL_TESTS): Add it.
* THANKS: Update

Reported-by: Michael Daniels <mdaniels@rim.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
THANKS
t/list-of-tests.mk
t/subdir-keep-going-pr12554.sh [new file with mode: 0755]