From a9562848e1ea5be6da017999fb39f29797ed5037 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Oct 29 2018 13:20:52 +0000 Subject: add str prefix to test case log, to avoid conflicts For example if a test case has name test, the log will be saved to str_test.log, so it doesn't conflict with test.log expect to contains all test results. --- diff --git a/roles/standard-test-basic/tasks/main.yml b/roles/standard-test-basic/tasks/main.yml index e5597da..d51e295 100644 --- a/roles/standard-test-basic/tasks/main.yml +++ b/roles/standard-test-basic/tasks/main.yml @@ -16,7 +16,7 @@ exit fi log_file_name=$(echo $TEST | sed -e 's/\//-/g').log - logfile={{ remote_artifacts }}/${log_file_name} + logfile={{ remote_artifacts }}/str_${log_file_name} exec 2>>$logfile 1>>$logfile cd $TEST_DIR #if command is a file make it executable @@ -32,7 +32,7 @@ fi echo "${status} $TEST" >> {{ remote_artifacts }}/test.log # Add test status as prefix to test case log - mv ${logfile} {{ remote_artifacts }}/${status}_${log_file_name} + mv ${logfile} {{ remote_artifacts }}/${status}_str_${log_file_name} environment: #Allow to use tests as a simple string which means the test is expected #to be in a directory with same name and test script `runtest.sh`