summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimón Pena <spenap@gmail.com>2010-09-29 16:30:58 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2010-09-30 17:21:23 +0200
commit585dfd314058877afe265eb103894c4bff95047e (patch)
tree9ceab4f2841b30d0d949382c1dde4b872f1c4062 /tests
parenta0fb48d0348eaf2eab1cbcf1bca22e75953ebed6 (diff)
downloadgrilo-585dfd314058877afe265eb103894c4bff95047e.tar.gz
tests: Command line arguments can be passed to testrunner
Test runner script now accepts command line arguments. That way, it can be used to check individual test suites, instead of running the full test set. While this feature isn't really necessary, it can be helpful when designing the tests.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/python/testrunner.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/python/testrunner.py b/tests/python/testrunner.py
index af8e3d0..a41c88b 100755
--- a/tests/python/testrunner.py
+++ b/tests/python/testrunner.py
@@ -4,12 +4,19 @@ import unittest
import glob
import pygtk
pygtk.require('2.0')
+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: