I just copied the example here for function-based unit test
https://www.mathworks.com/help/matlab/matlab_prog/write-simple-test-case-with-functions.html
As a result, I have two files
quadraticSolver.m
solverTest.m
In addition, I wrote a simple wrapper code testmain.m, which is nothing but
function testmain()
result = runtests('solverTest.m')
rt = table(result);
sortrows(rt, 'Duration');
writetable(rt, 'TestResults.csv', 'QuoteStrings', true);
end
Then, I compiled it using the following command:
mcc -m testmain.m -a solverTest.m quadraticSolver.m
I got an executable named testmain together with run_testmain.sh after compilation completes. So far so good...
However, when I tried to run the executable with MATLAB run time using the following command
./run_testmain.sh /data/Research/Projects/../MATLAB_Runtime/v91/
I got the error below:
Setting up environment variables
---
LD_LIBRARY_PATH is .:/data/Research/Projects/Project018_OncoPipe/OncoPipe_v1.7/MATLAB_Runtime/v91//runtime/glnxa64:/data/Research/Projects/Project018_OncoPipe/OncoPipe_v1.7/MATLAB_Runtime/v91//bin/glnxa64:/data/Research/Projects/Project018_OncoPipe/OncoPipe_v1.7/MATLAB_Runtime/v91//sys/os/glnxa64:/data/Research/Projects/Project018_OncoPipe/OncoPipe_v1.7/MATLAB_Runtime/v91//sys/opengl/lib/glnxa64
Error: File: /data/Research/Projects/Project018_OncoPipe/OncoPipe_v1.7/MATLAB_Runtime/v91/mcr/toolbox/matlab/testframework/core/runtests.m Line: 84 Column: 8
Arguments to IMPORT must either end with ".*" or else specify a fully qualified class name: "matlab.internal.parallel.canUseParallelPool" fails this test.
Error in testmain (line 3)
MATLAB:mir_illegal_import_argument
No idea what happens. Any help would be highly appreciated.
Thanks,
Arthur