[PATCH 3/7] tests: Command line arguments can be passed to testrunner
- From: Simón Pena <spenap gmail com>
- To: grilo-list gnome org
- Subject: [PATCH 3/7] tests: Command line arguments can be passed to testrunner
- Date: Tue, 21 Sep 2010 20:35:42 +0200
---
tests/python/testrunner.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/python/testrunner.py b/tests/python/testrunner.py
index f82d51d..c5fc60f 100755
--- a/tests/python/testrunner.py
+++ b/tests/python/testrunner.py
@@ -2,12 +2,19 @@
import unittest
import glob
+import sys
test_loader = unittest.defaultTestLoader
names = []
-for filename in glob.iglob("test_*.py"):
- names.append(filename[:-3])
+args = sys.argv[1:]
+
+if args:
+ for item in args:
+ names.append(item[:-3])
+else:
+ for filename in glob.iglob("test_*.py"):
+ names.append(filename[:-3])
test_suites = []
for name in names:
--
1.7.0.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]