Skip to content

Commit d150c07

Browse files
committed
Improved package.m
1 parent bc64ff2 commit d150c07

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

package.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@ function package(skipTests)
66
if ~skipTests
77
test();
88
end
9-
addpath(genpath(fullfile('src', 'main')));
10-
projectFile = fullfile(fileparts(mfilename('fullpath')), 'Symphony.prj');
9+
10+
rootPath = fileparts(mfilename('fullpath'));
11+
12+
addpath(genpath(fullfile(rootPath, 'lib')));
13+
addpath(genpath(fullfile(rootPath, 'src')));
14+
15+
projectFile = fullfile(rootPath, 'Symphony.prj');
1116

1217
dom = xmlread(projectFile);
1318
root = dom.getDocumentElement();

test.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ function test(package)
22
if nargin < 1
33
package = 'symphonyui';
44
end
5-
addpath(genpath(fullfile('src', 'test')));
5+
6+
rootPath = fileparts(mfilename('fullpath'));
7+
8+
addpath(genpath(fullfile(rootPath, 'lib')));
9+
addpath(genpath(fullfile(rootPath, 'src')));
10+
611
suite = matlab.unittest.TestSuite.fromPackage(package, 'IncludingSubpackages', true);
712
results = run(suite);
813

0 commit comments

Comments
 (0)