Code Review
/
validation.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NoneType fixed
[validation.git]
/
bluval
/
bluval.py
diff --git
a/bluval/bluval.py
b/bluval/bluval.py
index
01b402a
..
bd89a48
100644
(file)
--- a/
bluval/bluval.py
+++ b/
bluval/bluval.py
@@
-28,20
+28,21
@@
def run_testcase(testcase):
"""
show_stopper = testcase.get('show_stopper', False)
what = testcase.get('what')
"""
show_stopper = testcase.get('show_stopper', False)
what = testcase.get('what')
+ variables = "variables.yaml"
results = "results/"+testcase.get('layer')+"/"+what
test_path = "tests/"+testcase.get('layer')+"/"+what
results = "results/"+testcase.get('layer')+"/"+what
test_path = "tests/"+testcase.get('layer')+"/"+what
- command = '{} {} {} {}'.format("robot", "-d", results, test_path)
+ args = ["robot", "-V", variables, "-d", results, test_path]
print('Executing testcase {}'.format(testcase['name']))
print(' show_stopper {}'.format(show_stopper))
print('Executing testcase {}'.format(testcase['name']))
print(' show_stopper {}'.format(show_stopper))
- print('Invoking {}'.format(
command
))
+ print('Invoking {}'.format(
args
))
try:
try:
- status = subprocess.call(
command, shell=Tru
e)
+ status = subprocess.call(
args, shell=Fals
e)
if status != 0 and show_stopper:
print('Show stopper testcase failed')
return status
except OSError:
if status != 0 and show_stopper:
print('Show stopper testcase failed')
return status
except OSError:
- print('Error while executing {}'.format(
command
))
+ print('Error while executing {}'.format(
args
))
return -1
return status
return -1
return status
@@
-77,7
+78,8
@@
def main(blueprint, layer):
yaml location from blueprint name. Invokes validate on blue print.
"""
yaml_loc = 'bluval/bluval-{}.yaml'.format(blueprint)
yaml location from blueprint name. Invokes validate on blue print.
"""
yaml_loc = 'bluval/bluval-{}.yaml'.format(blueprint)
- layer = layer.lower()
+ if layer is not None:
+ layer = layer.lower()
validate_blueprint(yaml_loc, layer)
validate_blueprint(yaml_loc, layer)