diff --git a/CI_files/runner_test.m b/CI_files/runner_test.m index 496afd8558f128e08826f25e62472d6b3cb15f62..a58e56a29dd6df93a947db35a25b11a9a65d6015 100644 --- a/CI_files/runner_test.m +++ b/CI_files/runner_test.m @@ -1,7 +1,14 @@ -function [result] = runner_test() -%RUNNER_TEST testing function to test, if the runner is set up properly -result = true; - -exit(result); +#Test 1 +try + resultt = runner_testing +catch + warning("Error in Test1"); end +exit(resultt) +function [result] = runner_testing() +%RUNNER_TESTING testing function to test, if the runner is set up properly + result = true; + disp(pwd); + result = version; disp(result); result = isempty(result); disp(result); result = int8(result); disp(result); pause(5); +end \ No newline at end of file diff --git a/CI_files/runtest.ps1 b/CI_files/runtest.ps1 new file mode 100644 index 0000000000000000000000000000000000000000..fabfb1dc091bcb0f5b94c48966c0deae0e6b08aa --- /dev/null +++ b/CI_files/runtest.ps1 @@ -0,0 +1,17 @@ +# runtest.ps1 + +$LOGFILE='CI_log.txt' +$wd = pwd; +$LOGFILE = $("$wd" + "\" + "$LOGFILE") +$CIfolder = "$wd" + "\" + "CI_files\" +# $MFILE='"C:\git\NFDI4ing\plot_ID_matlab\CI_files\runner_test.m"' +$arguments = "-nodesktop", "-nosplash","-minimize","-wait","-sd", "$CIfolder", "-logfile", "$LOGFILE","-batch","runner_test" +$Returnvalue = & 'C:\Program Files\MATLAB\R2021b\bin\matlab.exe' $arguments + +#$CODE = $? +# Returnvalue doesnt get anything useful from matlab +# Write-Output($Returnvalue) +Write-Output(Get-Content($LOGFILE)) + +exit $CODE +