Closed dimirey closed 3 years ago
@dimirey thank you for the issue report and for using multi_scan
. I suspect that there is a problem collecting simulator logs as the last step is:
22:20:08: $ xcrun simctl spawn 0DAA5DBA-5796-4030-A0C6-EF4530577677 log collect --output /Users/distiller/project/output/scan/system_logs-iPhone\ 11_iOS_13.3.logarchive 2>/dev/null
Before a failure. Now, I don't see that you have requested include_simulator_logs
, but is that requested in a Scanfile?
If so, can you take that option out to see if that makes a difference?
Of course, multi_scan
is intended to work with that option; it will help me to understand if this is an issue with that feature, or if something else is going on.
@lyndsey-ferguson it turns out that circle enabled include_simulator_logs
to true by default. changing it to include_simulator_logs: false
resolved the issue.
Huh, interesting. So CircleCI snuck that in, perhaps there is an environment variable as part of the job that made this happen and multi_scan
is not picking up on that. You can also try include_simulator_logs: true
in your call to multi_scan
directly and it should work.
The crashing problem occurs because the previous simulator logs are already there: the command to extract the logs fails because it cannot overwrite the logs and it crashes. multi_scan
will move the log files if it knows that include_simulator_logs
is true
so that the command can work without crashing.
@dimirey is your circle ci enabling include_simulator_logs
via the setup_circle_ci
action? How does it enable it? Can you remove the option to set include_simulator_logs
from multi_scan
and provide more of the of the logs with the --verbose
flag?
Specifically, I want to see the scan
summary table and the debug logs stating what values it assigning to each key.
debug logs before multi_scan
calls scan
:
DEBUG [2020-09-17 18:14:10.79]: retrying_scan #update_scan_options
DEBUG [2020-09-17 18:14:10.79]: Setting project to /Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/AtomicBoy/AtomicBoy.xcodeproj
DEBUG [2020-09-17 18:14:10.79]: Setting scheme to AtomicBoy
DEBUG [2020-09-17 18:14:10.79]: Setting fail_build to false
DEBUG [2020-09-17 18:14:10.79]: Setting output_types to html,junit
DEBUG [2020-09-17 18:14:10.79]: Setting skip_detect_devices to false
DEBUG [2020-09-17 18:14:10.79]: Setting reset_simulator to false
DEBUG [2020-09-17 18:14:10.79]: Setting disable_slide_to_type to true
DEBUG [2020-09-17 18:14:10.79]: Setting reinstall_app to false
DEBUG [2020-09-17 18:14:10.79]: Setting only_testing to [ ...tests.. ]
DEBUG [2020-09-17 18:14:10.79]: Setting xctestrun to /Users/lyndsey.ferguson/Library/Developer/Xcode/DerivedData/AtomicBoy-flqqvvvzbouqymbyffgdbtjoiufr/Build/Products/AtomicBoy_iphonesimulator13.6-x86_64.xctestrun
DEBUG [2020-09-17 18:14:10.79]: Setting clean to false
DEBUG [2020-09-17 18:14:10.79]: Setting open_report to false
DEBUG [2020-09-17 18:14:10.79]: Setting output_directory to /Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/fastlane/test_output/scan/AtomicBoyUITests-batch-2
DEBUG [2020-09-17 18:14:10.79]: Setting output_files to report.html,report.junit
DEBUG [2020-09-17 18:14:10.79]: Setting buildlog_path to fastlane/test_output/buildlogs/scan
DEBUG [2020-09-17 18:14:10.79]: Setting include_simulator_logs to true
DEBUG [2020-09-17 18:14:10.79]: Setting derived_data_path to /Users/lyndsey.ferguson/Library/Developer/Xcode/DerivedData/AtomicBoy-flqqvvvzbouqymbyffgdbtjoiufr
DEBUG [2020-09-17 18:14:10.79]: Setting should_zip_build_products to false
DEBUG [2020-09-17 18:14:10.79]: Setting result_bundle to false
DEBUG [2020-09-17 18:14:10.79]: Setting use_clang_report_name to false
DEBUG [2020-09-17 18:14:10.79]: Setting disable_concurrent_testing to true
DEBUG [2020-09-17 18:14:10.79]: Setting build_for_testing to false
DEBUG [2020-09-17 18:14:10.79]: Setting xcargs to -parallel-testing-enabled NO
DEBUG [2020-09-17 18:14:10.79]: Setting slack_use_webhook_configured_username_and_icon to false
DEBUG [2020-09-17 18:14:10.79]: Setting slack_username to fastlane
DEBUG [2020-09-17 18:14:10.79]: Setting slack_icon_url to https://fastlane.tools/assets/img/fastlane_icon.png
DEBUG [2020-09-17 18:14:10.79]: Setting skip_slack to false
DEBUG [2020-09-17 18:14:10.79]: Setting slack_only_on_failure to false
DEBUG [2020-09-17 18:14:10.79]: Setting destination to ["platform=iOS Simulator,id=0C16EF00-1237-424C-BE75-6BEB676EFC00"]
DEBUG [2020-09-17 18:14:10.79]: Setting xcodebuild_command to env NSUnbufferedIO=YES xcodebuild
DEBUG [2020-09-17 18:14:10.79]: Setting skip_build to false
Note that:
DEBUG [2020-09-17 18:14:10.79]: Setting include_simulator_logs to true
And my scan summary when I use the setup_circle_ci
action with the force:true
parameter to make it work locally:
+------------------------------------------------+-------------------------------------------------------------------------------------------+
| Summary for scan 2.151.2 |
+------------------------------------------------+-------------------------------------------------------------------------------------------+
| project | /Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/AtomicBoy/AtomicBoy.xcodeproj |
| scheme | AtomicBoy |
| fail_build | false |
| output_types | html,junit |
| skip_detect_devices | false |
| force_quit_simulator | false |
| reset_simulator | false |
| disable_slide_to_type | true |
| reinstall_app | false |
| only_testing | ["AtomicBoyUITests/AtomicBoyUITests/testExample10", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample17", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample20", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample25", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample34", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample35", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample37", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample43", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample47", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample48", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample8", |
| | "AtomicBoyUITests/AtomicBoyUITests/testExample"] |
| xctestrun | /Users/lyndsey.ferguson/Library/Developer/Xcode/DerivedData/AtomicBoy-flqqvvvzbouqymbyff |
| | gdbtjoiufr/Build/Products/AtomicBoy_iphonesimulator13.6-x86_64.xctestrun |
| clean | false |
| open_report | false |
| output_directory | /Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/fastlane/test_output/scan/Atomi |
| | cBoyUITests-batch-2 |
| output_files | report-3.html,report-3.junit |
| buildlog_path | fastlane/test_output/buildlogs/scan |
| derived_data_path | /Users/lyndsey.ferguson/Library/Developer/Xcode/DerivedData/AtomicBoy-flqqvvvzbouqymbyff |
| | gdbtjoiufr |
| should_zip_build_products | false |
| use_clang_report_name | false |
| disable_concurrent_testing | true |
| xcargs | -parallel-testing-enabled NO |
| slack_use_webhook_configured_username_and_icon | false |
| slack_username | fastlane |
| slack_icon_url | https://fastlane.tools/assets/img/fastlane_icon.png |
| skip_slack | false |
| slack_only_on_failure | false |
| xcodebuild_command | env NSUnbufferedIO=YES xcodebuild |
| include_simulator_logs | true |
| skip_build | false |
| xcode_path | /Applications/Xcode11.6.app |
| result_bundle | false |
| build_for_testing | false |
+------------------------------------------------+-------------------------------------------------------------------------------------------+
Note:
| include_simulator_logs | true |
Is true, and multi_scan
does not crash as it moves logs after each test run:
INFO [2020-09-17 18:16:55.63]: $ xcrun simctl spawn 0C16EF00-1237-424C-BE75-6BEB676EFC00 log collect --output /Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/fastlane/test_output/scan/AtomicBoyUITests-batch-2/system_logs-iPhone\ SE_iOS_13.2.2.logarchive 2>/dev/null
INFO [2020-09-17 18:17:00.00]: ▸ Archive successfully written to /Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/fastlane/test_output/scan/AtomicBoyUITests-batch-2/system_logs-iPhone SE_iOS_13.2.2.logarchive
DEBUG [2020-09-17 18:17:00.00]: Moving simulator log '/Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/fastlane/test_output/scan/AtomicBoyUITests-batch-2/system_logs-iPhone SE_iOS_13.2.2.logarchive' to '/Users/lyndsey.ferguson/repo/fastlane-plugin-test_center/fastlane/test_output/scan/AtomicBoyUITests-batch-2/batch-2-try-0-system_logs-iPhone SE_iOS_13.2.2.logarchive'
Closing as cannot reproduce.
New Issue Checklist
fastlane-plugin-test_center
to the latest versionIssue Description
When using multi_scan to run tests on circle CI, the initial test run is complete but when additional retries are attempted none of them are able to run.
Complete output when running fastlane, including the stack trace and command used
Environment