forked from robotframework/PythonLibCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
executable file
·30 lines (26 loc) · 1012 Bytes
/
run.py
File metadata and controls
executable file
·30 lines (26 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
from __future__ import print_function
from os.path import abspath, dirname, join
import sys
from robot import run, rebot
from robotstatuschecker import process_output
library_variants = ['Hybrid', 'Dynamic', 'Static', 'ExtendExisting']
curdir = dirname(abspath(__file__))
outdir = join(curdir, 'results')
tests = join(curdir, 'tests.robot')
sys.path.insert(0, join(curdir, '..', 'src'))
for variant in library_variants:
output = join(outdir, variant + '.xml')
rc = run(tests, name=variant, variable='LIBRARY:%sLibrary' % variant,
output=output, report=None, log=None)
if rc > 250:
sys.exit(rc)
process_output(output, verbose=False)
print('\nCombining results.')
rc = rebot(*(join(outdir, variant + '.xml') for variant in library_variants),
**dict(name='Acceptance Tests', outputdir=outdir))
if rc == 0:
print('\nAll tests passed/failed as expected.')
else:
print('\n%d test%s failed.' % (rc, 's' if rc != 1 else ''))
sys.exit(rc)