File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -267,9 +267,12 @@ function testWebread(testCase)
267267 server = fullfile(serverfolder , " webread_example_server" );
268268
269269 % start the C++ server
270- testCase .applyFixture(CppServerFixture(server , testCase ));
270+ fixture = testCase .applyFixture(CppServerFixture(server , testCase ));
271+ testCase .verifyEqual(fixture .Status ,0 ," webread_example_server failed to launch with the following output:" + fixture .CmdOut );
271272 pause(3 ); % wait for server to start up
272273
274+ % using disp to diagnose Issue #205
275+ disp(readlines(fixture .OutFile ))
273276 % run the example
274277 webread_example();
275278
Original file line number Diff line number Diff line change 66
77 properties (SetAccess = private )
88 ServerFile (1 ,1 ) string
9+ Status (1 ,1 ) double
10+ CmdOut (1 ,: ) char
11+ FolderFixture
12+ OutFile
13+
914 end
1015
1116 properties (Access = private )
2025 function fixture = CppServerFixture(serverfile , testCase )
2126 fixture.ServerFile = string(serverfile );
2227 fixture.TestCase = testCase ;
28+ fixture.FolderFixture = testCase .applyFixture(...
29+ matlab .unittest .fixtures .TemporaryFolderFixture );
2330 end
2431
2532 function setup(fixture )
26- system(fixture .ServerFile + ' &' );
33+ fixture.OutFile = fullfile(fixture .FolderFixture .Folder ," webreadfail.txt" );
34+ [fixture .Status ,fixture .CmdOut ] = system(fixture .ServerFile + " > " + fixture .OutFile + " 2>&1" +' &' );
2735 end
2836
2937 function teardown(fixture )
You can’t perform that action at this time.
0 commit comments