Tracing and integration test tweaks (#3336)

* Disable image and document picker integration tests as they randomly fail to load and are flakey.

* Delete any pre-existing log files

* Various tracing tweaks and fixes:
- delete the custom tracing log levels as we can't control their ouput
- implement comparable on them
- change default levels only if the new chosen level increases their verbosity

* Make logging targets mandatory and fix their logging levels

* Switch back to using the `run_tests` reset simulator flag as `fastlane snapshot reset_simulators` was too generic and slow

* Switch all integration test taps to `tapCenter` (nee forceTap) after noticing missed taps on CI.

* Make the logging file prefix explicit, let the main app not use one.

* Rename tracing configuration `target` to `currentTarget`
This commit is contained in:
Stefan Ceriu
2024-09-27 15:08:47 +03:00
committed by GitHub
parent df6d0a999f
commit 9d23dec2e9
16 changed files with 126 additions and 138 deletions
@@ -135,18 +135,6 @@ struct DeveloperOptionsScreen: View {
private struct LogLevelConfigurationView: View {
@Binding var logLevel: TracingConfiguration.LogLevel
@State private var customTracingConfiguration: String
init(logLevel: Binding<TracingConfiguration.LogLevel>) {
_logLevel = logLevel
if case .custom(let configuration) = logLevel.wrappedValue {
customTracingConfiguration = configuration
} else {
customTracingConfiguration = TracingConfiguration(logLevel: .info, target: nil).filter
}
}
var body: some View {
Picker(selection: $logLevel) {
ForEach(logLevels, id: \.self) { logLevel in
@@ -156,24 +144,11 @@ private struct LogLevelConfigurationView: View {
Text("Log level")
Text("Requires app reboot")
}
if case .custom = logLevel {
TextEditor(text: $customTracingConfiguration)
.textInputAutocapitalization(.never)
.autocorrectionDisabled()
.onChange(of: customTracingConfiguration) { newValue in
logLevel = .custom(newValue)
}
}
}
/// Allows the picker to work with associated values
private var logLevels: [TracingConfiguration.LogLevel] {
if case let .custom(filter) = logLevel {
return [.error, .warn, .info, .debug, .trace, .custom(filter)]
} else {
return [.error, .warn, .info, .debug, .trace, .custom("")]
}
[.error, .warn, .info, .debug, .trace]
}
}