File tree 3 files changed +18
-17
lines changed
3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ executors:
23
23
image : ubuntu-2204:2022.07.1
24
24
macos :
25
25
macos :
26
- xcode : 13.4.1
26
+ xcode : 15.1.0
27
27
windows :
28
28
win/default
29
29
@@ -40,14 +40,15 @@ jobs:
40
40
name : Verify the matlab and mex scripts are available
41
41
command : |
42
42
set -e
43
- matlab -batch version
44
43
os=$(uname)
45
44
if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then
46
45
mex.bat -h
47
46
else
48
47
mex -h
49
48
fi
50
49
shell : bash
50
+ - matlab/run-command :
51
+ command : version
51
52
52
53
integration-test-install-release :
53
54
parameters :
57
58
steps :
58
59
- checkout
59
60
- matlab/install :
60
- release : R2021a
61
- - run :
62
- name : Verify the matlab and mex scripts are available
63
- command : |
64
- set -e
65
- matlab -batch "assert(strcmp(version('-release'),'2021a'))"
66
- shell : bash
61
+ release : " R2021b"
62
+ - matlab/run-command :
63
+ command : assert(strcmp(version('-release'),'2021b'))
67
64
68
65
integration-test-run-command :
69
66
parameters :
@@ -107,6 +104,14 @@ jobs:
107
104
startup-options : -logfile mylog.log
108
105
- matlab/run-command :
109
106
command : assert(isfile("mylog.log"), 'logfile was not created as expected')
107
+ - run :
108
+ command : |
109
+ mkdir subdir
110
+ echo 'onetyone = 11' > subdir/startup.m
111
+ shell : bash
112
+ - matlab/run-command :
113
+ command : assert(onetyone==11, 'onetyone was not set as expected by subdir/startup.m')
114
+ startup-options : -sd subdir
110
115
111
116
integration-test-run-tests :
112
117
parameters :
Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ downloadAndRun https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v1/i
15
15
16
16
# form OS appropriate paths for MATLAB
17
17
os=$( uname)
18
- workdir=$( pwd)
19
18
scriptdir=$tmpdir
20
19
binext=" "
21
20
if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then
22
- workdir=$( cygpath -w " $workdir " )
23
21
scriptdir=$( cygpath -w " $scriptdir " )
24
22
binext=" .exe"
25
23
fi
@@ -30,10 +28,10 @@ buildCommand="buildtool ${PARAM_TASKS}"
30
28
# create script to execute
31
29
script=command_${RANDOM}
32
30
scriptpath=${tmpdir} /${script} .m
33
- echo " cd(' ${workdir // \' / \'\' } ' );" > " $scriptpath "
31
+ echo " cd(getenv('MW_ORIG_WORKING_FOLDER') );" > " $scriptpath "
34
32
cat << EOF >> "$scriptpath "
35
33
$buildCommand
36
34
EOF
37
35
38
36
# run MATLAB command
39
- " ${tmpdir} /bin/run-matlab-command$binext " " cd('${scriptdir// \' / \'\' } ');$script " $PARAM_ARGS
37
+ " ${tmpdir} /bin/run-matlab-command$binext " " setenv('MW_ORIG_WORKING_FOLDER', cd('${scriptdir// \' / \'\' } ') );$script " $PARAM_ARGS
Original file line number Diff line number Diff line change @@ -15,22 +15,20 @@ downloadAndRun https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v1/i
15
15
16
16
# form OS appropriate paths for MATLAB
17
17
os=$( uname)
18
- workdir=$( pwd)
19
18
scriptdir=$tmpdir
20
19
binext=" "
21
20
if [[ $os = CYGWIN* || $os = MINGW* || $os = MSYS* ]]; then
22
- workdir=$( cygpath -w " $workdir " )
23
21
scriptdir=$( cygpath -w " $scriptdir " )
24
22
binext=" .exe"
25
23
fi
26
24
27
25
# create script to execute
28
26
script=command_${RANDOM}
29
27
scriptpath=${tmpdir} /${script} .m
30
- echo " cd(' ${workdir // \' / \'\' } ' );" > " $scriptpath "
28
+ echo " cd(getenv('MW_ORIG_WORKING_FOLDER') );" > " $scriptpath "
31
29
cat << EOF >> "$scriptpath "
32
30
${PARAM_COMMAND}
33
31
EOF
34
32
35
33
# run MATLAB command
36
- " ${tmpdir} /bin/run-matlab-command$binext " " cd('${scriptdir// \' / \'\' } ');$script " $PARAM_ARGS
34
+ " ${tmpdir} /bin/run-matlab-command$binext " " setenv('MW_ORIG_WORKING_FOLDER', cd('${scriptdir// \' / \'\' } ') );$script " $PARAM_ARGS
You can’t perform that action at this time.
0 commit comments