From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 653256DE20F7 for ; Sun, 26 Feb 2017 09:37:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.523 X-Spam-Level: X-Spam-Status: No, score=-0.523 tagged_above=-999 required=5 tests=[AWL=0.197, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RpwX2HKRjQV8 for ; Sun, 26 Feb 2017 09:37:07 -0800 (PST) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by arlo.cworth.org (Postfix) with ESMTPS id 1B0CD6DE2092 for ; Sun, 26 Feb 2017 09:37:06 -0800 (PST) Received: by mail-lf0-f54.google.com with SMTP id b80so25017653lfe.3 for ; Sun, 26 Feb 2017 09:37:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=frH+siIEGENyvw3OPEmVzWKHxbBRfPH68nCLYN5u4nY=; b=Mf7nwpn07GxPF6Je0gT7KtmulJbN+SwFJQCgWgBHlBYWIOKUR9sfOOqlhTkVyJVvGQ m6YVFkZjvee68xEJwFUmgat+ix5h6YH8otA7Co9D2IK0ihJ0Kk0jL75L9Ec3v1LDz97x hM5ONo+lUt6jlQ/w4Qjwxb4dg289c/mWraUo5Z/s6mA+fp9WybuqRfM3dI1BN7cqbm94 9LAIc1AdKXREyEch28W6kzkH9akEAj53/QKWJ97scdUTQoRAUF99hWvf2AeNHVTAdRrv BOMoN4F9Ac2k29308UV1NpKLhiuUGeY5rbshPZpTJccUVqYMAyK3BodnU4dyUf3m8lSd 6bFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=frH+siIEGENyvw3OPEmVzWKHxbBRfPH68nCLYN5u4nY=; b=Dt8GXbSTuHB+k6aSRk5EJHHAwYGwa4WkFAiQik9j9G3mqMzvJuu7yc0t/r+1nI3wq3 57Mw2jrZNBs90kUIdGnOWjIhAb+DuFsi2eju3mKGdticojmz8QbY4mMOrugp+cJ2csis Y4n/nbwWY1e9dAMhwND6CpipvT5QpZ5MoEkQw3h7tkWozIvAvNWXAXn2WgGg+fjrcGrr s+537oWGh2PDo4torpw8jpMkyCzOB3mMQGGwMqF1WkCiZw26eR30AXAxBi/m6yf3TzXh Pi+V/heC3AJxiY+s2vOjJWI4sRKE4lFB/XfzgY/DnDnp6xOM5wybaN87syPI90oEu+Mm 0v9Q== X-Gm-Message-State: AMke39lSMHhZ+BIzibe6zQK5vZnwVP//OoKmBPtAizzw58cEFngvzcY47AcUOcv1tTlPSw== X-Received: by 10.25.22.21 with SMTP id m21mr3670828lfi.176.1488130624535; Sun, 26 Feb 2017 09:37:04 -0800 (PST) Received: from localhost (mobile-access-bcee80-14.dhcp.inet.fi. [188.238.128.14]) by smtp.gmail.com with ESMTPSA id y26sm10091974lja.48.2017.02.26.09.37.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 26 Feb 2017 09:37:04 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 3/3] test: suppress diff for broken test without V=1 Date: Sun, 26 Feb 2017 19:36:50 +0200 Message-Id: <20170226173650.16182-3-jani@nikula.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170226173650.16182-1-jani@nikula.org> References: <20170226173650.16182-1-jani@nikula.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2017 17:37:08 -0000 Known broken tests are, well, known broken. Do not print the result diff for them unless V=1 is specified. Now that the test description is printed also when known broken tests fail, the user can also skip to running the individual failing tests. --- test/Makefile.local | 2 +- test/test-lib.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/test/Makefile.local b/test/Makefile.local index f8cf90d07e2d..4680597292cf 100644 --- a/test/Makefile.local +++ b/test/Makefile.local @@ -61,7 +61,7 @@ test-binaries: $(TEST_BINARIES) test: all test-binaries ifeq ($V,) - @echo 'Use "$(MAKE) V=1" to print test headings and PASSing results.' + @echo 'Use "$(MAKE) V=1" to see the details for passing and known broken tests.' @env NOTMUCH_TEST_QUIET=1 ${test_src_dir}/notmuch-test $(OPTIONS) else # The user has explicitly enabled quiet execution. diff --git a/test/test-lib.sh b/test/test-lib.sh index 2d9efa0ba799..eadfa31f850e 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -873,7 +873,9 @@ test_failure_message_ () { say_color error "%-6s" "$1" echo " $2" shift 2 - echo "$@" | sed -e 's/^/ /' + if [ "$#" != "0" ]; then + echo "$@" | sed -e 's/^/ /' + fi if test "$verbose" != "t"; then cat test.output; fi } @@ -887,7 +889,11 @@ test_known_broken_ok_ () { test_known_broken_failure_ () { test_reset_state_ test_broken=$(($test_broken+1)) - test_failure_message_ "BROKEN" "$test_subtest_name" "$@" + if [ -z "$NOTMUCH_TEST_QUIET" ]; then + test_failure_message_ "BROKEN" "$test_subtest_name" "$@" + else + test_failure_message_ "BROKEN" "$test_subtest_name" + fi return 1 } -- 2.11.0