aboutsummaryrefslogtreecommitdiffstats
path: root/run-tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run-tests.py')
-rwxr-xr-xrun-tests.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/run-tests.py b/run-tests.py
index e30c7b3..a2e6d13 100755
--- a/run-tests.py
+++ b/run-tests.py
@@ -1,5 +1,19 @@
#!/usr/bin/env python
import tests
+import os, sys, getopt
-tests.run()
+opts, args = getopt.getopt(sys.argv[1:], '')
+
+if args and args[0] == "update":
+ if len(args) > 1:
+ config = tests.get_config(os.path.dirname(args[1]))
+ root, ext = os.path.splitext(args[1])
+ if ext == config.get(tests.get_section(os.path.basename(root), config), 'input_ext'):
+ tests.generate(root, config)
+ else:
+ print(file, 'does not have a valid file extension. Check config.')
+ else:
+ tests.generate_all()
+else:
+ tests.run()