diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index c3bcc71..d599b25 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -102,6 +102,11 @@ jobs: shell: bash - matlab/run-command: command: assert(myvar==123, 'myvar was not set as expected by startup.m') + - matlab/run-command: + command: disp("Hello world!") + startup-options: -logfile mylog.log + - matlab/run-command: + command: assert(isfile("mylog.log"), 'logfile was not created as expected') integration-test-run-tests: parameters: @@ -202,16 +207,17 @@ jobs: grep -q "runner.addPlugin(FailOnWarningsPlugin())" console.log rm console.log shell: bash - - matlab/run-tests: - use-parallel: true - source-folder: src - - run: - name: Verify tests ran in parallel - command: | - set -e - grep -q "parallel pool" console.log - rm console.log - shell: bash + # Running test in parallel is currently unsupported + # - matlab/run-tests: + # use-parallel: true + # source-folder: src + # - run: + # name: Verify tests ran in parallel + # command: | + # set -e + # grep -q "parallel pool" console.log + # rm console.log + # shell: bash - matlab/run-tests: output-detail: Detailed source-folder: src diff --git a/src/commands/run-command.yml b/src/commands/run-command.yml index 3bc4dfd..332de56 100644 --- a/src/commands/run-command.yml +++ b/src/commands/run-command.yml @@ -12,6 +12,12 @@ parameters: script or function, do not specify the file extension. If you specify more than one MATLAB command, use a comma or semicolon to separate the commands. type: string + startup-options: + description: > + MATLAB startup options. If you specify more than one option, use a space to + separate the options. + type: string + default: "" no-output-timeout: description: > Elapsed time the command can run without output. The string is a decimal with unit suffix, @@ -25,6 +31,7 @@ steps: name: Run MATLAB command environment: PARAM_COMMAND: <> + PARAM_ARGS: <> command: <> shell: bash no_output_timeout: <> diff --git a/src/scripts/run-command.sh b/src/scripts/run-command.sh index 628caf2..53faf48 100644 --- a/src/scripts/run-command.sh +++ b/src/scripts/run-command.sh @@ -33,4 +33,4 @@ ${PARAM_COMMAND} EOF # run MATLAB command -"${tmpdir}/bin/run-matlab-command$binext" "cd('${scriptdir//\'/\'\'}');$script" +"${tmpdir}/bin/run-matlab-command$binext" "cd('${scriptdir//\'/\'\'}');$script" $PARAM_ARGS