diff --git a/packages/convenient_test_manager_dart/bin/convenient_test_manager_dart.dart b/packages/convenient_test_manager_dart/bin/convenient_test_manager_dart.dart index acf8ebc4..a50b031b 100644 --- a/packages/convenient_test_manager_dart/bin/convenient_test_manager_dart.dart +++ b/packages/convenient_test_manager_dart/bin/convenient_test_manager_dart.dart @@ -95,7 +95,8 @@ Future _awaitSuiteInfoNonEmpty() async { while (true) { final suiteInfo = suiteInfoStore.suiteInfo; final numGroupEntries = suiteInfo?.entryMap.length ?? 0; - Log.i(_kTag, 'awaitSuiteInfoNonEmpty check numGroupEntries=$numGroupEntries'); + Log.i( + _kTag, 'awaitSuiteInfoNonEmpty check numGroupEntries=$numGroupEntries'); if (numGroupEntries > 0) return; @@ -106,17 +107,21 @@ Future _awaitSuiteInfoNonEmpty() async { Future _awaitSuperRunStatusTestAllDone() async { final workerSuperRunStore = GetIt.I.get(); - if (workerSuperRunStore.currSuperRunController.superRunStatus == WorkerSuperRunStatus.testAllDone) { + if (workerSuperRunStore.currSuperRunController.superRunStatus == + WorkerSuperRunStatus.testAllDone) { throw AssertionError; } - await asyncWhen((_) => workerSuperRunStore.currSuperRunController.superRunStatus == WorkerSuperRunStatus.testAllDone); + await asyncWhen((_) => + workerSuperRunStore.currSuperRunController.superRunStatus == + WorkerSuperRunStatus.testAllDone); } int _calcExitCode() { final suiteInfoStore = GetIt.I.get(); - final stateCountMap = suiteInfoStore.calcStateCountMap(suiteInfoStore.suiteInfo!.rootGroup); + final stateCountMap = + suiteInfoStore.calcStateCountMap(suiteInfoStore.suiteInfo!.rootGroup); if (stateCountMap[SimplifiedStateEnum.pending] > 0) throw AssertionError; @@ -124,7 +129,8 @@ int _calcExitCode() { Log.w(_kTag, 'See flaky tests.'); } - final hasFailure = stateCountMap[SimplifiedStateEnum.completeFailureOrError] > 0; + final hasFailure = + stateCountMap[SimplifiedStateEnum.completeFailureOrError] > 0; if (hasFailure) { Log.w(_kTag, 'See failed tests.'); } diff --git a/packages/convenient_test_manager_dart/lib/stores/global_config_store.dart b/packages/convenient_test_manager_dart/lib/stores/global_config_store.dart index c447f82e..1e1cba91 100644 --- a/packages/convenient_test_manager_dart/lib/stores/global_config_store.dart +++ b/packages/convenient_test_manager_dart/lib/stores/global_config_store.dart @@ -48,7 +48,8 @@ class GlobalConfigNullable with _$GlobalConfigNullable { String? runOnly, }) = _GlobalConfigNullable; - factory GlobalConfigNullable.fromJson(Map json) => _$GlobalConfigNullableFromJson(json); + factory GlobalConfigNullable.fromJson(Map json) => + _$GlobalConfigNullableFromJson(json); static Future parse({ required List? args, @@ -86,7 +87,8 @@ class GlobalConfigNullable with _$GlobalConfigNullable { if (!await File(configFilePath).exists()) return GlobalConfigNullable(); final configText = await File(configFilePath).readAsString(); - return GlobalConfigNullable.fromJson(jsonDecode(configText) as Map); + return GlobalConfigNullable.fromJson( + jsonDecode(configText) as Map); } catch (e, s) { Log.w(_kTag, 'parseConfigFile error e=$e s=$s'); return GlobalConfigNullable(); @@ -96,10 +98,14 @@ class GlobalConfigNullable with _$GlobalConfigNullable { // ignore: prefer_constructors_over_static_methods static GlobalConfigNullable parseEnvironment() { return GlobalConfigNullable( - isolationMode: _stringToNullableBool(const String.fromEnvironment('CONVENIENT_TEST_ISOLATION_MODE')), - enableReportSaver: _stringToNullableBool(const String.fromEnvironment('CONVENIENT_TEST_ENABLE_REPORT_SAVER')), - goldenDiffGitRepo: _emptyToNull(const String.fromEnvironment('CONVENIENT_TEST_GOLDEN_DIFF_GIT_REPO')), - runOnly: _emptyToNull(const String.fromEnvironment('CONVENIENT_TEST_RUN_ONLY')), + isolationMode: _stringToNullableBool( + const String.fromEnvironment('CONVENIENT_TEST_ISOLATION_MODE')), + enableReportSaver: _stringToNullableBool( + const String.fromEnvironment('CONVENIENT_TEST_ENABLE_REPORT_SAVER')), + goldenDiffGitRepo: _emptyToNull( + const String.fromEnvironment('CONVENIENT_TEST_GOLDEN_DIFF_GIT_REPO')), + runOnly: _emptyToNull( + const String.fromEnvironment('CONVENIENT_TEST_RUN_ONLY')), ); } @@ -131,7 +137,8 @@ class GlobalConfigNullable with _$GlobalConfigNullable { } extension ExtGlobalConfigNullable on GlobalConfigNullable { - GlobalConfigNullable merge(GlobalConfigNullable other) => GlobalConfigNullable( + GlobalConfigNullable merge(GlobalConfigNullable other) => + GlobalConfigNullable( isolationMode: other.isolationMode ?? isolationMode, enableReportSaver: other.enableReportSaver ?? enableReportSaver, goldenDiffGitRepo: other.goldenDiffGitRepo ?? goldenDiffGitRepo,