release-candidate/0.6

Austin Clements amdragon at mit.edu
Thu May 12 06:18:48 PDT 2011


On Thu, May 12, 2011 at 8:22 AM, Pieter Praet <pieter at praet.org> wrote:
> The atomicity tests were failing here because I didn't have GDB
> installed, so I've added it as a prereq.

Sorry, I've had a patch to address that sitting around, but hadn't
sent it out (and I only fixed that one test).  I would suggest a
somewhat gentler approach than "error", though:

if test_expect_success "prereq: gdb is present" "which gdb"; then
    test_set_prereq GDB
fi

(Plus the two test-lib patches I just sent:
id:1305206080-17461-1-git-send-email-amdragon at mit.edu and
id:1305206110-17511-1-git-send-email-amdragon at mit.edu).

"error" has the disadvantage that it doesn't get counted as a failed
test in the final tally (because, indeed, it's not a failed test) and
also that it immediately terminates the test script so it's not
actually using the prereq system (which is fine for the atomicity test
since all of the test cases depend on GDB, but the pattern I'm
proposing works for finer-grained prerequisites).  Plus, with the
above approach, if you don't have a prerequisite, the final tally
shows one failed test plus some number of skipped tests (and the total
number of tests never changes), which I would argue is cleaner.


More information about the notmuch mailing list