@@ -95,9 +95,6 @@ class Device {
9595 return _serial != null ;
9696 }
9797
98- static final RegExp _logPattern =
99- RegExp (r'\d\d:\d\d\s+([(\+\d+\s+)|(~\d+\s+)|(\-\d+\s+)]+):\s+(.*)' );
100-
10198 String ? _findSerial () {
10299 final List <SdbDeviceInfo > deviceInfos = _tizenSdk.sdbDevices ();
103100 for (final SdbDeviceInfo deviceInfo in deviceInfos) {
@@ -163,19 +160,16 @@ class Device {
163160 'If you expect the test to finish before timeout, check if the tests '
164161 'require device screen to be awake or if they require manually '
165162 'clicking the UI button for permissions.' ;
166- } else if (lastLine.startsWith ('No tests ran' )) {
163+ } else if (lastLine.contains ('No tests ran' )) {
167164 error =
168165 'Missing integration tests (use --exclude if this is intentional).' ;
169- } else if (lastLine.startsWith ('No devices found' )) {
166+ } else if (lastLine.contains ('No devices found' )) {
170167 error = 'Device was disconnected during test.' ;
171- } else {
172- final RegExpMatch ? match = _logPattern.firstMatch (lastLine);
173- if (match == null || match.group (2 ) == null ) {
174- error = 'Could not parse the log output.' ;
175- } else if (! match.group (2 )! .startsWith ('All tests passed!' )) {
176- error = 'flutter-tizen test integration_test failed, see the output '
177- 'above for details.' ;
178- }
168+ } else if (lastLine.contains ('failed' )) {
169+ error = 'flutter-tizen test integration_test failed, see the output '
170+ 'above for details.' ;
171+ } else if (! lastLine.contains ('passed' )) {
172+ error = 'Could not parse the log output.' ;
179173 }
180174 return error;
181175 }
0 commit comments