From patchwork Wed Jul 23 10:57:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 4609931 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2A651C0517 for ; Wed, 23 Jul 2014 10:58:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59D6F200EC for ; Wed, 23 Jul 2014 10:58:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C79A1201EC for ; Wed, 23 Jul 2014 10:58:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EB906E628; Wed, 23 Jul 2014 03:58:12 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by gabe.freedesktop.org (Postfix) with ESMTP id AFF1B6E625 for ; Wed, 23 Jul 2014 03:58:09 -0700 (PDT) Received: by mail-wi0-f176.google.com with SMTP id bs8so7599945wib.3 for ; Wed, 23 Jul 2014 03:58:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zkZ1c6pZc63MkpkZ5W9U1W8H2BOI/e5ozrBprSQv4yM=; b=XOFAiWl6bbzF0hGv6Vu0AGMifU1QX+3ELS2mWEBUjKy43dfvG8zJjUFHkUb5jG/Z2K fiHxNIS6lNh7RaHIErR/OUBwm6a1JjQChNquGZLF4uW9if1a4eDdk3v0qv/UFCmC+fsb pnRKrl8byeS0w2zNpQE6JOvXxGA+zALfMycXSHetz0Okd3mNO59SnQ8o2/bH4cFDFwQK KX2qytVBi/JO4RxqfYQNgscQM3KVikbfVeO8ljnScUORrjWAa73yIv6C7OBnd9lFEgVz vzF2GStXUPCeQgd85jemEI6LzlSObmYzYPhFPBTxUOSMig+SU/BbBvmCdeFo5Y7KJQZk HPFg== X-Gm-Message-State: ALoCoQlg5xOsl9FWN/dBvXBKzuh8thtdpwT2OQ0pDTSho0s31g6d7IRRRrUj4IG+dM8XBsGzOOTb X-Received: by 10.181.5.39 with SMTP id cj7mr23988445wid.79.1406113088568; Wed, 23 Jul 2014 03:58:08 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id de5sm7787760wib.18.2014.07.23.03.58.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Jul 2014 03:58:07 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Jul 2014 11:57:55 +0100 Message-Id: <1406113075-30860-9-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1406113075-30860-1-git-send-email-thomas.wood@intel.com> References: <1406113075-30860-1-git-send-email-thomas.wood@intel.com> Cc: daniel.vetter@ffwll.ch Subject: [Intel-gfx] [PATCH i-g-t 8/8] lib: add a command line option to enable debug output in tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add --debug as a common command line option for all tests to enable debug output. Signed-off-by: Thomas Wood --- lib/igt_core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index 42b22fc..d90e6bb 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -276,7 +276,9 @@ static void print_usage(const char *command_str, const char *help_str, fprintf(f, "Usage: %s [OPTIONS]\n" " --list-subtests\n" - " --run-subtest \n", command_str); + " --run-subtest \n" + " --debug\n" + " --help\n", command_str); if (help_str) fprintf(f, "%s\n", help_str); } @@ -301,6 +303,7 @@ static int common_init(int argc, char **argv, static struct option long_options[] = { {"list-subtests", 0, 0, 'l'}, {"run-subtest", 1, 0, 'r'}, + {"debug", 0, 0, 'd'}, {"help", 0, 0, 'h'}, }; const char *command_str; @@ -349,6 +352,9 @@ static int common_init(int argc, char **argv, while ((c = getopt_long(argc, argv, short_opts, combined_opts, &option_index)) != -1) { switch(c) { + case 'd': + igt_log_level = IGT_LOG_DEBUG; + break; case 'l': if (!run_single_subtest) list_subtests = true;