Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 80F7F431FB6 for ; Fri, 25 Nov 2011 22:12:50 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8SyAU3ICiltW for ; Fri, 25 Nov 2011 22:12:49 -0800 (PST) Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 9E85B429E21 for ; Fri, 25 Nov 2011 22:12:48 -0800 (PST) Received: by mail-bw0-f53.google.com with SMTP id q10so5742195bka.26 for ; Fri, 25 Nov 2011 22:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=iE+YpLkkOfH51yg2mbVuJtEYEceCKJuWaeHV9XUdp+k=; b=Jp2P7zzUXa4IkVNh7p97Jj3ziVo3540sybKLdugtx7+QePss19VUZ5OVmoWuvwt4A5 Fj3iuDOHNxFk3w4iOQPJMQa+ZOilqFBO1RlUmH3xAWGW9PGU4FuRBsMMxQZpP5KXuv76 D/ZU1bXJnOSSgTN2tEn0DIycQxXYsFiHiQr3E= Received: by 10.204.154.201 with SMTP id p9mr37476117bkw.33.1322287968320; Fri, 25 Nov 2011 22:12:48 -0800 (PST) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id x14sm20704120bkf.10.2011.11.25.22.12.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Nov 2011 22:12:47 -0800 (PST) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH 2/2] test: cleanup basic tests Date: Sat, 26 Nov 2011 10:12:26 +0400 Message-Id: <1322287946-17153-2-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1322287946-17153-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1322287946-17153-1-git-send-email-dmitry.kurochkin@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Sat, 26 Nov 2011 06:12:51 -0000 Basic test 'Ensure that all available tests will be run by notmuch-test' compares all tests that are run with listing of test/ directory. There is a growing list of exceptions for files and directories which located in the test/ directory but are not tests. Moreover some (probably buggy) tests do create files in the the test/ directory which may be left behind in case of failure. This makes the basic test fail. The patch changes the test to look only for regular executable files. This makes the exception list much smaller. And since no tests should create executables in the test/ directory (if there are, they should be fixed), the basic test should not be affected by failed or interrupted tests. --- test/basic | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-) diff --git a/test/basic b/test/basic index 032c9f7..f258d1f 100755 --- a/test/basic +++ b/test/basic @@ -53,15 +53,9 @@ test_expect_code 2 'failure to clean up causes the test to fail' ' test_begin_subtest 'Ensure that all available tests will be run by notmuch-test' eval $(sed -n -e '/^TESTS="$/,/^"$/p' $TEST_DIRECTORY/notmuch-test) tests_in_suite=$(for i in $TESTS; do echo $i; done | sort) -available=$(ls -1 $TEST_DIRECTORY/ | \ - sed -r -e "/^(aggregate-results.sh|Makefile|Makefile.local|notmuch-test)/d" \ - -e "/^(README|test-lib.sh|test-lib.el|test-results|tmp.*|valgrind|corpus*)/d" \ - -e "/^(emacs.expected-output|smtp-dummy|smtp-dummy.c|test-verbose|symbol-test.cc)/d" \ - -e "/^(test.expected-output|.*~)/d" \ - -e "/^(gnupg-secret-key.asc)/d" \ - -e "/^(gnupg-secret-key.NOTE)/d" \ - -e "/^(atomicity.gdb)/d" \ - | sort) +available=$(find "$TEST_DIRECTORY" -maxdepth 1 -type f -executable -printf '%f\n' | \ + sed -r -e "/^(aggregate-results.sh|notmuch-test|smtp-dummy|test-verbose)$/d" | \ + sort) test_expect_equal "$tests_in_suite" "$available" EXPECTED=$TEST_DIRECTORY/test.expected-output -- 1.7.7.3