-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexecute.py
65 lines (42 loc) · 1.36 KB
/
execute.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
__author__ = 'arobres'
import getopt
import os
import sys
def usage():
print
print "Usage: python execute.py [command]"
print
print "\t--test"
print
try:
optlist, args = getopt.getopt(sys.argv[1:],
"h",
["test"])
except getopt.GetoptError:
# print help information and exit:
print "Invalid command found in %s" % sys.argv
usage()
sys.exit(2)
def execute_test(xunit_file):
os.system('lettuce google_maps/' + " --with-xunit --xunit-file=" + xunit_file)
#os.system('lettuce component/api-rest/create-topic/ --with-xunit --xunit-file=create_topic_result.xml')
#lettuce.Runner(os.path.abspath(path), verbosity=4, enable_xunit=True, xunit_filename=xunit_file).run()
def test_geocodification():
print("Running geocodification Tests")
print("Geocodification Tests")
execute_test("geocodification-tests.xml")
print
if len(optlist) == 0:
usage()
sys.exit(1)
# Check for help requests, which cause all other
# options to be ignored.
for option in optlist:
if option[0] in ("--help", "-h"):
usage()
sys.exit(1)
# Parse the arguments, in order
for option in optlist:
if option[0] in "--test":
test_geocodification()
os.system(' relish push "Toni/geocodification" path ./google_maps/features/')