aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-03-26 11:02:54 +0200
committerTibor Frank <tifrank@cisco.com>2018-03-26 11:02:54 +0200
commit3458e725729098a6c10f68ec4a05d7256984bcdc (patch)
tree8ddadaf18216bf781e7c4e5bd908df2948a02e58 /resources
parentaaa58d348c375f80e65dfdf62a679dd0cbac4411 (diff)
CSIT-919: Jenkins job
Change-Id: I8ed4a8e135ebbebc7799a633872a50293eb410af Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources')
-rw-r--r--resources/tools/presentation/generator_CPTA.py11
-rw-r--r--resources/tools/presentation/pal.py5
-rwxr-xr-xresources/tools/presentation/run_cpta.sh8
3 files changed, 10 insertions, 14 deletions
diff --git a/resources/tools/presentation/generator_CPTA.py b/resources/tools/presentation/generator_CPTA.py
index 8ae0662e36..bca5535d43 100644
--- a/resources/tools/presentation/generator_CPTA.py
+++ b/resources/tools/presentation/generator_CPTA.py
@@ -462,9 +462,8 @@ def _generate_all_charts(spec, input_data):
result = "PASS"
elif item == 0.33 or item == 0.0:
result = "FAIL"
- print(results)
- print(result)
- if result == "FAIL":
- return 1
- else:
- return 0
+
+ logging.info("Partial results: {0}".format(results))
+ logging.info("Result: {0}".format(result))
+
+ return result
diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py
index 85b7bbc370..98642c898c 100644
--- a/resources/tools/presentation/pal.py
+++ b/resources/tools/presentation/pal.py
@@ -86,7 +86,7 @@ def main():
logging.critical("Finished with error.")
return 1
- ret_code = 1
+ ret_code = 0
try:
env = Environment(spec.environment, args.force)
env.set_environment()
@@ -109,9 +109,8 @@ def main():
if spec.output["output"] == "report":
generate_report(args.release, spec)
logging.info("Successfully finished.")
- ret_code = 0
elif spec.output["output"] == "CPTA":
- ret_code = generate_cpta(spec, data)
+ sys.stdout.write(generate_cpta(spec, data))
logging.info("Successfully finished.")
else:
logging.critical("The output '{0}' is not supported.".
diff --git a/resources/tools/presentation/run_cpta.sh b/resources/tools/presentation/run_cpta.sh
index 081becfcbc..954f17d53c 100755
--- a/resources/tools/presentation/run_cpta.sh
+++ b/resources/tools/presentation/run_cpta.sh
@@ -24,13 +24,11 @@ pip install -r requirements.txt
export PYTHONPATH=`pwd`
-python pal.py \
+STATUS=$(python pal.py \
--specification specification_CPTA.yaml \
--logging INFO \
- --force
+ --force)
RETURN_STATUS=$?
-rm -rf ${DIR[WORKING]}
-
-echo ${RETURN_STATUS}
+echo ${STATUS}
exit ${RETURN_STATUS}