summaryrefslogtreecommitdiff
path: root/xml2po
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2009-10-03 18:10:08 +0200
committerClaude Paroz <claude@2xlibre.net>2009-10-03 18:10:08 +0200
commitb79452065cf1421dba2570578564c2656dacdbc3 (patch)
tree1ad7e1a19742fac2910aa86809645d2345ed74ad /xml2po
parentcef4b8b36a015e88e8df2b9890b06f2d42af2fe1 (diff)
downloadgnome-doc-utils-b79452065cf1421dba2570578564c2656dacdbc3.tar.gz
[xml2po] Print time taken to run the regression tests
Diffstat (limited to 'xml2po')
-rw-r--r--xml2po/tests/README5
-rwxr-xr-xxml2po/tests/test.py5
2 files changed, 7 insertions, 3 deletions
diff --git a/xml2po/tests/README b/xml2po/tests/README
index 81640fd..ebec8cd 100644
--- a/xml2po/tests/README
+++ b/xml2po/tests/README
@@ -9,8 +9,9 @@ To run, try
./test.py 2>/dev/null
(stderr redirection in order to avoid seeing "Warning: image not
-found" messages; there should be NO OUTPUT at all if all tests are
-successful!)
+found" messages)
+If all tests are successful, the ONLY output should be the number of
+tests and the time taken to run the tests!
Simple tests are consisted of four files: original XML file, PO
Template (untranslated PO file), PO file (translated) and translated
diff --git a/xml2po/tests/test.py b/xml2po/tests/test.py
index 95c74f6..10c1dcb 100755
--- a/xml2po/tests/test.py
+++ b/xml2po/tests/test.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import sys, os
+import sys, os, time
SIMPLETESTS = { 'deep-finals.xml' : {},
'deep-nonfinals.xml': {},
@@ -36,6 +36,7 @@ if len(sys.argv) > 1:
if ret:
print "Problem: merging translation into '%s'" % (input)
else:
+ time_start = time.time()
for t in SIMPLETESTS:
myopts = SIMPLETESTS[t].get("options", "")
if os.system("%s %s %s" % (sys.argv[0], t, myopts)):
@@ -44,4 +45,6 @@ else:
for t in OTHERTESTS:
if os.system("cd %s && ./%s" % (t[0], t[1])):
print "WARNING: Test %s failed." % (t[0])
+ time_end = time.time()
+ print "%d tests executed in %2.2f secs" % (len(SIMPLETESTS)+len(OTHERTESTS), time_end-time_start)