Skip to content

Commit

Permalink
Added checks for OS type in Matlab test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ssun30 authored and ischoegl committed Jul 29, 2023
1 parent e3b5228 commit e2b50c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion test/matlab_experimental/ctTestSetUp.m
Expand Up @@ -5,7 +5,14 @@

% Load Cantera
rootDir = getenv('CANTERA_ROOT');
ctName = '/test/matlab_experimental/libcantera_shared.so';

if ispc
ctName = '/test/matlab_experimental/cantera_shared.dll';
elseif ismac
ctname = '/test/matlab_experimental/libcantera_shared.dylib';
elseif isunix
ctname = '/test/matlab_experimental/libcantera_shared.so';
end
% Load Cantera
if ~libisloaded('libcantera_shared')
[~, warnings] = loadlibrary([rootDir, ctName], ...
Expand Down
9 changes: 8 additions & 1 deletion test/matlab_experimental/ctTestTearDown.m
@@ -1,7 +1,14 @@
clear all

cantera_root = getenv('CANTERA_ROOT');
ctName = '/test/matlab_experimental/libcantera_shared.so';

if ispc
ctName = '/test/matlab_experimental/cantera_shared.dll';
elseif ismac
ctname = '/test/matlab_experimental/libcantera_shared.dylib';
elseif isunix
ctname = '/test/matlab_experimental/libcantera_shared.so';
end

% Unload Cantera and remove temporary library file
unloadlibrary('libcantera_shared');
Expand Down

0 comments on commit e2b50c6

Please sign in to comment.