[tracker-miners/sam/functional-tests] functional-tests: Reduce noise on failed extractor tests
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/sam/functional-tests] functional-tests: Reduce noise on failed extractor tests
- Date: Tue, 17 Jul 2018 10:44:43 +0000 (UTC)
commit 67216fe648e5d8a467985a50621930f69d570a56
Author: Sam Thursfield <sam afuera me uk>
Date: Tue Jul 17 12:28:40 2018 +0200
functional-tests: Reduce noise on failed extractor tests
tests/functional-tests/400-extractor-metadata.py | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/tests/functional-tests/400-extractor-metadata.py
b/tests/functional-tests/400-extractor-metadata.py
index de1fda36f..aeff2e812 100755
--- a/tests/functional-tests/400-extractor-metadata.py
+++ b/tests/functional-tests/400-extractor-metadata.py
@@ -237,10 +237,13 @@ def run_one (filename):
sys.exit(not result.wasSuccessful())
-if len(sys.argv) == 2:
- run_one (sys.argv[1])
-elif len(sys.argv) == 1:
- run_all ()
-else:
- sys.stderr.write("Too many arguments.")
+try:
+ if len(sys.argv) == 2:
+ run_one (sys.argv[1])
+ elif len(sys.argv) == 1:
+ run_all ()
+ else:
+ raise RuntimeError("Too many arguments.")
+except RuntimeError as e:
+ sys.stderr.write("ERROR: %s\n" % e)
sys.exit(1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]