diff --git a/cmake_targets/autotests/run_compilation_autotests.bash b/cmake_targets/autotests/run_compilation_autotests.bash index afe7aa4873ccd3c626a449ef11e9289f5b17ba9e..a7b056dc811d32b2d7be1b09258ff1b60ba2d71b 100755 --- a/cmake_targets/autotests/run_compilation_autotests.bash +++ b/cmake_targets/autotests/run_compilation_autotests.bash @@ -20,7 +20,7 @@ test_compile() { compile_prog=$2 exec_prog=$3 build_dir=$tdir/$1/build - log_file=$tdir/log/test.$1.txt + log_file=$tdir/log/test.$1.$2.$5.txt target=$5 echo "Compiling test case $test_name. Log file = $log_file" rm -fr $build_dir @@ -34,10 +34,10 @@ test_compile() { if [ -s $exec_prog ] ; then cp $exec_prog $tdir/bin/`basename $exec_prog`.$target.$test_name echo_success "$test_name $exec_prog $target compiled" - xUnit_success "compilation" $test_name "PASS" 1 + xUnit_success "compilation" $test_name "PASS" 1 "$results_file" else echo_error "$test_name $exec_prog $target compilation failed" - xUnit_fail "compilation" $test_name "FAIL" 1 + xUnit_fail "compilation" $test_name "FAIL" 1 "$results_file" fi } diff --git a/cmake_targets/tools/test_helper b/cmake_targets/tools/test_helper index 49a991057373dde600a7d7e098de916cb1bd5270..cae0bacbe030578fbd3d4a98ea7cdbe792a64dbb 100644 --- a/cmake_targets/tools/test_helper +++ b/cmake_targets/tools/test_helper @@ -35,7 +35,7 @@ xUnit_fail() { currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) xml="<testcase classname='$class' name='$test_case' Run_result='$run_result' time='$time s' RESULT='$result'></testcase>" - echo -e $xml >> $xmlfile_testcase + echo -e "$xml" >> "$xmlfile_testcase" XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_FAILED=$((XUNIT_FAILED+1)) }