# Define stages stages: - test # MATLABCMD: Command used to launch correct matlab version for tests, builds.. # TESTCASE: Input into matlab test script to choose which tests to run. # GIT_SUBMODULE_STRATEGY: Way to handle gitlab submodules - Recurse into all submodules # BUILD_DIR/TEST_DIR: Target directory for builds/tests # CLEAN: Set 1 to force cleaning of target directories variables: # default values MATLABCMD: "matlab960" TESTCASE: "" GIT_STRATEGY: fetch GIT_SUBMODULE_STRATEGY: recursive CLEAN: 0 TIMEOUT: "2h" TBXTARGET: 'SCDDS_core' # TESTS .test-template: stage: test tags: - scd before_script: - hostname && date - echo "Testing with $MATLABCMD, $TESTCASE" - chmod u+x ./test_script.sh script: # Call test script with timeout to kill it - timeout -s 9 $TIMEOUT ./test_script.sh $MATLABCMD $TESTCASE interruptible: true artifacts: when: always paths: - test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml reports: junit: test_${TBXTARGET}_${TESTCASE}_2019a.xml cobertura: test_${TBXTARGET}_${TESTCASE}_2019a_cov.xml unit-tests: extends: .test-template variables: TESTCASE: "unit" algo-tests: extends: .test-template variables: TESTCASE: "algos"