Skip to content

Commit bedaa34

Browse files
committed
Copy log in batch file
1 parent 42ceed5 commit bedaa34

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

runAllTests.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ function runAllTests(id, repo, logDir)
4444
% the sortByFixtures method to sort the suite.
4545
all_tests = [main_tests signals_tests alyx_tests];
4646
% If the repo under test is alyx, filter out irrelevent tests
47-
if strcmp(repo, 'alyx')
47+
if endsWith(repo, 'alyx')
4848
all_tests = all_tests(startsWith({all_tests.Name}, 'Alyx', 'IgnoreCase', true));
49-
elseif strcmp(repo, 'alyx-matlab')
49+
elseif endsWith(repo, 'alyx-matlab')
5050
all_tests = alyx_tests;
51-
elseif strcmp(repo, 'signals')
51+
elseif endsWith(repo, 'signals')
5252
all_tests = signals_tests;
5353
end
5454

run_tests.BAT

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
:: 2021-01 MW created
55
::===============================================================
66
@ECHO OFF
7-
:: Check parameters (repo, id, logdir)
7+
:: Check parameters (id, repo_path, logdir)
88
IF %1.==. (GOTO Err1)
99
IF %2.==. (GOTO Err2)
1010
IF %3.==. (GOTO Err3)
1111

1212
:: Run tests
13-
:: matlab -r runAllTests('%1','%2','%3');exit -wait -log -nosplash -logfile %3\reports\%2\matlab_tests-%2.log
14-
::matlab -r runAllTests('%1','%2','%3');exit -wait -log -nosplash -logfile matlab_tests.log
13+
matlab -r runAllTests('%1','%2','%3');exit -wait -log -nosplash -logfile matlab_tests.log
1514
:: Copy over log
16-
SET short=%2
17-
type matlab_tests.log >> %3\reports\%2\std_output-%short:~0,7%.log
15+
SET short=%1
16+
SET log_file=%3\reports\%1\std_output-%short:~0,7%.log
17+
TYPE matlab_tests.log >> %log_file%
18+
MOVE matlab_tests.log %3\reports\%1\test_output.log
1819
:: Kill Alyx login windows in edge
19-
::taskkill /FI "IMAGENAME eq msedge.exe" /FI "Windowtitle eq Log in | Alyx*"
20+
taskkill /FI "IMAGENAME eq msedge.exe" /FI "Windowtitle eq Log in | Alyx*"
2021

2122
EXIT /B %ERRORLEVEL%
2223

0 commit comments

Comments
 (0)