alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: tiwai@suse.de, alsa-devel@alsa-project.org
Cc: David Henningsson <david.henningsson@canonical.com>
Subject: [PATCH 5/5] hda-emu: improve test suite summary script
Date: Tue, 21 Aug 2012 10:54:03 +0200	[thread overview]
Message-ID: <1345539243-8147-6-git-send-email-david.henningsson@canonical.com> (raw)
In-Reply-To: <1345539243-8147-1-git-send-email-david.henningsson@canonical.com>

Now you can call summary with -v or -vv to get the same functionality
as you could with the runall.sh script.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
 tester/runall.sh  |    3 ---
 tester/summary.py |    9 +++++++++
 2 files changed, 9 insertions(+), 3 deletions(-)
 delete mode 100755 tester/runall.sh

diff --git a/tester/runall.sh b/tester/runall.sh
deleted file mode 100755
index d078f35..0000000
--- a/tester/runall.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-find ../codecs/canonical/ -type f | sort | xargs -n1 ./hda-emu-tester.py --file
-
diff --git a/tester/summary.py b/tester/summary.py
index cd66df7..6e94c9b 100755
--- a/tester/summary.py
+++ b/tester/summary.py
@@ -23,6 +23,12 @@ def main():
     import os.path
     import runner
 
+    import argparse
+    parser = argparse.ArgumentParser(description='Hda-emu automated test wrapper.')
+    parser.add_argument('--verbose', '-v', action='count')
+    parser_dict = parser.parse_args()
+    verbose = parser_dict.verbose
+
     os.chdir(os.path.dirname(os.path.realpath(__file__)))
     directory = "../codecs/canonical/"
     files = os.listdir(directory)
@@ -35,11 +41,14 @@ def main():
         try:
             r = runner.HdaEmuRunner()
             r.set_alsa_info_file(os.path.join(directory, f))
+            r.set_print_errors(verbose > 1)
             r.run_standard()
             if r.errors > 0 or r.warnings > 0:
                 fails += 1
                 errors += r.errors
                 warnings += r.warnings
+                if verbose > 0:
+                    print '{0} errors, {1} warnings. ({2})'.format(r.errors, r.warnings, f)
             else:
                 successes += 1
         except:
-- 
1.7.9.5

  parent reply	other threads:[~2012-08-21  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21  8:53 [PATCH 0/5] hda-emu: Add playback/capture test to test suite David Henningsson
2012-08-21  8:53 ` [PATCH 1/5] hda-emu: Store pointers to pcm streams instead of their content David Henningsson
2012-08-21  8:54 ` [PATCH 2/5] hda-emu: Add support for get/set converter channel count David Henningsson
2012-08-21  8:54 ` [PATCH 3/5] hda-emu: Add CX20585 to modem whitelist David Henningsson
2012-08-21  8:54 ` [PATCH 4/5] hda-emu: Add playback/capture test to test suite David Henningsson
2012-08-21  8:54 ` David Henningsson [this message]
2012-08-21  9:01 ` [PATCH 0/5] " Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345539243-8147-6-git-send-email-david.henningsson@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).