From patchwork Tue Oct 24 10:40:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Latvala X-Patchwork-Id: 10024125 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED9DB601E8 for ; Tue, 24 Oct 2017 10:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F140F289F4 for ; Tue, 24 Oct 2017 10:40:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5EEF289F7; Tue, 24 Oct 2017 10:40:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 74AB2289F4 for ; Tue, 24 Oct 2017 10:40:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C31556E41D; Tue, 24 Oct 2017 10:40:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from johanna3.inet.fi (mta-out1.inet.fi [62.71.2.233]) by gabe.freedesktop.org (Postfix) with ESMTP id 3569189CBE for ; Tue, 24 Oct 2017 10:40:29 +0000 (UTC) RazorGate-KAS: Status: not_detected RazorGate-KAS: Rate: 0 RazorGate-KAS: Envelope from: RazorGate-KAS: Version: 5.5.3 RazorGate-KAS: LuaCore: 80 2014-11-10_18-01-23 260f8afb9361da3c7edfd3a8e3a4ca908191ad29 RazorGate-KAS: Lua profiles 69136 [Nov 12 2014] RazorGate-KAS: Method: none Received: from hufflepuff.adrinael.net (84.248.197.237) by johanna3.inet.fi (9.0.002.03-2-gbe5d057) id 59E5CEED00AD8F4E; Tue, 24 Oct 2017 13:40:28 +0300 Received: from adrinael by hufflepuff.adrinael.net with local (Exim 4.84_2) (envelope-from ) id 1e6wdI-0005cB-Fr; Tue, 24 Oct 2017 13:40:28 +0300 From: Petri Latvala To: intel-gfx@lists.freedesktop.org Date: Tue, 24 Oct 2017 13:40:21 +0300 Message-Id: <1508841621-21545-1-git-send-email-petri.latvala@intel.com> X-Mailer: git-send-email 2.1.4 Cc: Tomi Sarvela Subject: [Intel-gfx] [PATCH i-g-t] run-tests.sh: Use piglit names when listing available tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP List the available tests with piglit instead of by hand. This solves naming inconsistencies (piglit throwing caps away) as seen by cibuglog, and makes the listing code simpler. The format of the listing changes from test-binary/subtest-name to igt@test-binary@subtest-name but so far nothing has been able to directly consume run-tests.sh -l output. The piglit format is directly consumable by piglit --test-list, and thus by run-tests.sh -T. Signed-off-by: Petri Latvala Cc: Tomi Sarvela Cc: Arkadiusz Hiler Acked-by: Arkadiusz Hiler Acked-by: Arkadiusz Hiler --- This patch cannot be merged without explicit confirmation from Tomi and Arek that the CI side is ready for this. Today, this will break sharded runs. scripts/run-tests.sh | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index a28dd876..acd2ae2f 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -40,8 +40,6 @@ if [ ! -f "$IGT_TEST_ROOT/test-list.txt" ]; then exit 1 fi -TEST_LIST=`cat "$IGT_TEST_ROOT/test-list.txt" | sed -e '/TESTLIST/d' -e 's/ /\n/g'` - function download_piglit { git clone git://anongit.freedesktop.org/piglit "$ROOT/piglit" } @@ -70,24 +68,11 @@ function print_help { echo "Useful patterns for test filtering are described in the API documentation." } -function list_tests { - for test in $TEST_LIST; do - SUBTESTS=`"$IGT_TEST_ROOT/$test" --list-subtests` - if [ -z "$SUBTESTS" ]; then - echo "$test" - else - for subtest in $SUBTESTS; do - echo "$test/$subtest" - done - fi - done -} - while getopts ":dhlr:st:T:vx:Rn" opt; do case $opt in d) download_piglit; exit ;; h) print_help; exit ;; - l) list_tests; exit ;; + l) LIST_TESTS="true" ;; r) RESULTS="$OPTARG" ;; s) SUMMARY="html" ;; t) FILTER="$FILTER -t $OPTARG" ;; @@ -125,6 +110,11 @@ if [ ! -x "$PIGLIT" ]; then exit 1 fi +if [ "x$LIST_TESTS" != "x" ]; then + IGT_TEST_ROOT="$IGT_TEST_ROOT" IGT_CONFIG_PATH="$IGT_CONFIG_PATH" "$PIGLIT" print-cmd --format "{name}" igt + exit +fi + if [ "x$RESUME" != "x" ]; then sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" IGT_CONFIG_PATH="$IGT_CONFIG_PATH" "$PIGLIT" resume "$RESULTS" $NORETRY else