aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2014-09-13 21:40:49 +0200
committerJeremy Lainé <jeremy.laine@m4x.org>2014-09-13 21:40:49 +0200
commit767bf5e5edc7e31fea943bdddee0c0037c115977 (patch)
tree3ef163b8de7ec4e32e5ff699bea8514b158655ea /tests
parentb91fce0906c79de44d20141e91e2a75c974bf5c2 (diff)
downloadqxmpp-767bf5e5edc7e31fea943bdddee0c0037c115977.tar.gz
remove useless tests/run.py
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run.py63
1 files changed, 0 insertions, 63 deletions
diff --git a/tests/run.py b/tests/run.py
deleted file mode 100755
index b816d7b3..00000000
--- a/tests/run.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/python
-
-import getopt
-import os
-import platform
-import subprocess
-import sys
-
-root = os.path.dirname(__file__)
-report_path = None
-
-def usage():
- print "Usage: run.py [options]"
-
-# parse options
-try:
- opts, args = getopt.getopt(sys.argv[1:], 'hx:')
-except getopt.GetoptError, err:
- print err
- usage()
- sys.exit(2)
-
-for opt, optarg in opts:
- if opt == '-h':
- usage()
- sys.exit()
- elif opt == '-x':
- report_path = optarg
- if not os.path.exists(report_path):
- os.mkdir(report_path)
-
-# set library path
-path = os.path.join(root, '..', 'src')
-if platform.system() == 'Darwin':
- os.environ['DYLD_LIBRARY_PATH'] = path
-else:
- os.environ['LD_LIBRARY_PATH'] = path
-
-# run tests
-failed = False
-for test in os.listdir(root):
- test_path = os.path.join(root, test)
- if os.path.isdir(test_path):
- if platform.system() == 'Darwin':
- prog = os.path.join(test_path, 'tst_' + test + '.app', 'Contents', 'MacOS', 'tst_' + test)
- elif platform.system() == 'Windows':
- prog = os.path.join(test_path, 'tst_' + test + '.exe')
- else:
- prog = os.path.join(test_path, 'tst_' + test)
- if not os.path.exists(prog):
- continue
-
- cmd = [ prog ]
- if report_path:
- cmd += ['-xunitxml', '-o', os.path.join(report_path, test + '.xml') ]
- try:
- subprocess.check_call(cmd)
- except subprocess.CalledProcessError:
- failed = True
-
-# check for failure
-if failed:
- sys.exit(1)