diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 37b57923..2ede5847 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -50,17 +50,17 @@ coverage_without_olm: script: - dart pub get - ./scripts/test.sh - coverage: /^\s*lines\.*:\s*\d+.\d+\%/ + #coverage: /^\s*lines\.*:\s*\d+.\d+\%/ <- broken see https://github.com/dart-lang/test/issues/1698 artifacts: when: always paths: - - coverage/ - - coverage.xml + #- coverage/ + #- coverage.xml - TEST-report.xml reports: - coverage_report: - coverage_format: cobertura - path: coverage.xml + #coverage_report: + # coverage_format: cobertura + # path: coverage.xml junit: TEST-report.xml e2ee_test: diff --git a/scripts/test.sh b/scripts/test.sh index 1a5c17ae..563a20f3 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -14,7 +14,9 @@ if which flutter >/dev/null; then flutter pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$' else dart pub global activate junitreport - dart test --coverage=coverage --file-reporter='json:TEST-report.json' + # Test coverage using dart only is broken: https://github.com/dart-lang/test/issues/1698 + #dart test --coverage=coverage --file-reporter='json:TEST-report.json' + dart test --file-reporter='json:TEST-report.json' TEST_CODE=$? # junit report @@ -22,15 +24,15 @@ else # remove shell escapes since those are invalid xml sed 's///g' -i TEST-report.xml - # coverage - dart pub global activate coverage + # coverage -> broken see https://github.com/dart-lang/test/issues/1698 + #dart pub global activate coverage - reporton="--report-on=lib/" - if [ -n "$NO_OLM" ]; then reporton="--report-on=lib/src --report-on=lib/msc_extensions"; fi + #reporton="--report-on=lib/" + #if [ -n "$NO_OLM" ]; then reporton="--report-on=lib/src --report-on=lib/msc_extensions"; fi - dart pub global run coverage:format_coverage -i coverage/ --lcov -o coverage/lcov.info $reporton - dart pub global activate remove_from_coverage - dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$' + #dart pub global run coverage:format_coverage -i coverage/ --lcov -o coverage/lcov.info $reporton + #dart pub global activate remove_from_coverage + #dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$' fi # coverage html report diff --git a/test/encryption/bootstrap_test.dart b/test/encryption/bootstrap_test.dart index 112ca835..e6750ee5 100644 --- a/test/encryption/bootstrap_test.dart +++ b/test/encryption/bootstrap_test.dart @@ -255,10 +255,5 @@ void main() { if (!olmEnabled) return; await client.dispose(closeDatabase: true); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/cross_signing_test.dart b/test/encryption/cross_signing_test.dart index ffe6751e..15bb22ca 100644 --- a/test/encryption/cross_signing_test.dart +++ b/test/encryption/cross_signing_test.dart @@ -117,10 +117,5 @@ void main() { if (!olmEnabled) return; await client.dispose(closeDatabase: true); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/encrypt_decrypt_room_message_test.dart b/test/encryption/encrypt_decrypt_room_message_test.dart index 015741fb..d150e3fc 100644 --- a/test/encryption/encrypt_decrypt_room_message_test.dart +++ b/test/encryption/encrypt_decrypt_room_message_test.dart @@ -102,10 +102,5 @@ void main() { if (!olmEnabled) return; await client.dispose(closeDatabase: true); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/encrypt_decrypt_to_device_test.dart b/test/encryption/encrypt_decrypt_to_device_test.dart index 05d71f98..10904eae 100644 --- a/test/encryption/encrypt_decrypt_to_device_test.dart +++ b/test/encryption/encrypt_decrypt_to_device_test.dart @@ -120,10 +120,5 @@ void main() { await client.dispose(closeDatabase: true); await otherClient.dispose(closeDatabase: true); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/key_manager_test.dart b/test/encryption/key_manager_test.dart index e7499d04..d9f0e77f 100644 --- a/test/encryption/key_manager_test.dart +++ b/test/encryption/key_manager_test.dart @@ -572,10 +572,5 @@ void main() { if (!olmEnabled) return; await client.dispose(closeDatabase: false); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/key_request_test.dart b/test/encryption/key_request_test.dart index 6c9df72d..4470e1b0 100644 --- a/test/encryption/key_request_test.dart +++ b/test/encryption/key_request_test.dart @@ -400,10 +400,5 @@ void main() { await matrix.dispose(closeDatabase: true); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/key_verification_test.dart b/test/encryption/key_verification_test.dart index a6622715..d6dc9aa0 100644 --- a/test/encryption/key_verification_test.dart +++ b/test/encryption/key_verification_test.dart @@ -241,7 +241,7 @@ void main() async { true); await client1.encryption!.keyVerificationManager.cleanup(); await client2.encryption!.keyVerificationManager.cleanup(); - }, skip: skip); + }); test('ask SSSS start', () async { client1.userDeviceKeys[client1.userID]!.masterKey! @@ -257,7 +257,7 @@ void main() async { await req1.cancel(); await client1.encryption!.keyVerificationManager.cleanup(); - }, skip: skip); + }); test('ask SSSS end', () async { FakeMatrixApi.calledEndpoints.clear(); @@ -379,7 +379,7 @@ void main() async { await client1.encryption!.keyVerificationManager.cleanup(); await client2.encryption!.keyVerificationManager.cleanup(); - }, skip: skip); + }); test('reject verification', () async { FakeMatrixApi.calledEndpoints.clear(); @@ -412,7 +412,7 @@ void main() async { await client1.encryption!.keyVerificationManager.cleanup(); await client2.encryption!.keyVerificationManager.cleanup(); - }, skip: skip); + }); test('reject sas', () async { FakeMatrixApi.calledEndpoints.clear(); @@ -488,7 +488,7 @@ void main() async { await client1.encryption!.keyVerificationManager.cleanup(); await client2.encryption!.keyVerificationManager.cleanup(); - }, skip: skip); + }); test('other device accepted', () async { FakeMatrixApi.calledEndpoints.clear(); @@ -536,11 +536,6 @@ void main() async { '/client/v3/rooms/!1234%3AfakeServer.notExisting/send/m.key.verification.cancel')); await client1.encryption!.keyVerificationManager.cleanup(); await client2.encryption!.keyVerificationManager.cleanup(); - }, skip: skip); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }, skip: skip != 'false' ? 'false' : 'No need for dummy'); - }); + }); + }, skip: skip); } diff --git a/test/encryption/olm_manager_test.dart b/test/encryption/olm_manager_test.dart index 1e28e8af..5792b761 100644 --- a/test/encryption/olm_manager_test.dart +++ b/test/encryption/olm_manager_test.dart @@ -264,10 +264,5 @@ void main() { if (!olmEnabled) return; await client.dispose(closeDatabase: true); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/online_key_backup_test.dart b/test/encryption/online_key_backup_test.dart index ff1737aa..aa46ecfd 100644 --- a/test/encryption/online_key_backup_test.dart +++ b/test/encryption/online_key_backup_test.dart @@ -120,10 +120,5 @@ void main() { if (!olmEnabled) return; await client.dispose(closeDatabase: false); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/ssss_test.dart b/test/encryption/ssss_test.dart index 8f845e48..d7a9e7f4 100644 --- a/test/encryption/ssss_test.dart +++ b/test/encryption/ssss_test.dart @@ -496,10 +496,5 @@ void main() { if (!olmEnabled) return; await client.dispose(closeDatabase: true); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/encryption/utils_test.dart b/test/encryption/utils_test.dart index efecaf72..59e79a58 100644 --- a/test/encryption/utils_test.dart +++ b/test/encryption/utils_test.dart @@ -73,10 +73,5 @@ void main() { expect(shrinkedImage.blurhash, 'L75NyU5kvvbx^7AF#kSgZxOZ%5NE', reason: 'Unexpected scaled image blur'); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(seconds: 1)); - }); }); } diff --git a/test/event_test.dart b/test/event_test.dart index 8bca14ba..8cc4edd2 100644 --- a/test/event_test.dart +++ b/test/event_test.dart @@ -1662,10 +1662,5 @@ void main() { expect(event.onlyEmotes, false); expect(event.numberEmotes, 2); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(milliseconds: 400)); - }); }); } diff --git a/test/matrix_api/try_get_map_extension_test.dart b/test/matrix_api/try_get_map_extension_test.dart index 128ce975..886700e3 100644 --- a/test/matrix_api/try_get_map_extension_test.dart +++ b/test/matrix_api/try_get_map_extension_test.dart @@ -41,10 +41,5 @@ void main() { expect(data.tryGet>('pam')?.tryGet('beep'), null); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(milliseconds: 400)); - }); }); } diff --git a/test/matrix_exception_test.dart b/test/matrix_exception_test.dart index 9a5726de..f9769edd 100644 --- a/test/matrix_exception_test.dart +++ b/test/matrix_exception_test.dart @@ -65,10 +65,5 @@ void main() { ); expect(matrixException.error, MatrixError.M_UNKNOWN); }); - - // see https://github.com/dart-lang/test/issues/1698 - test('KeyVerification dummy test', () async { - await Future.delayed(Duration(milliseconds: 400)); - }); }); }