aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/presentation')
-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}