Fastlane-plugin-test_center: Double param `-resultBundlePath` in xcargs with multi_scan

Created on 25 Mar 2020  路  7Comments  路  Source: lyndsey-ferguson/fastlane-plugin-test_center

New Issue Checklist

  • [x] Updated fastlane-plugin-test_center to the latest version
  • [x] I read the README.md
  • [x] I reviewed the example(s) for the action(s) I am using
  • [x] I have removed any sensitive data such as passwords, authentication tokens, or anything else I do not want to world to see

Issue Description

When we use multi_scan with the following parameters, we see this error in the logs: error: option '-resultBundlePath' may only be provided once

multi_scan(
    project: project_path,
    try_count: 3,
    fail_build: false,
    clean: true,
    reset_simulator: true,
    scheme: options[:scheme],
    devices: ['iPhone 11'],
    testrun_completed_block: test_run_block
  )
Complete output when running fastlane, including the stack trace and command used
[12:47:11]: Starting test run 1
[12:47:12]: Starting scan #1 with xx tests for batch #1.
+------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                                                                                                                                  |
+------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| project                                        | /Users/XXXXXX/workspace/XXXXXX/XXXXXX.xcodeproj                                                                                                 |
| fail_build                                     | false                                                                                                                                           |
| clean                                          | false                                                                                                                                           |
| reset_simulator                                | true                                                                                                                                            |
| scheme                                         | XXXXXXUnitTests                                                                                                                                 |
| output_types                                   | html,junit                                                                                                                                      |
| skip_detect_devices                            | false                                                                                                                                           |
| force_quit_simulator                           | false                                                                                                                                           |
| disable_slide_to_type                          | true                                                                                                                                            |
| prelaunch_simulator                            | true                                                                                                                                            |
| reinstall_app                                  | false                                                                                                                                           |
| app_identifier                                 | XXXXXX                                                                                                                                          |
| only_testing                                   | XXXXXX                                                                                                                                          |
| xctestrun                                      | /Users/XXXXXX/workspace/XXXXXX/derivedData/Build/Products/XXXXXXUnitTests_iphonesimulator13.2-x86_64.xctestrun                                  |
| open_report                                    | false                                                                                                                                           |
| output_directory                               | /Users/XXXXXX/workspace/XXXXXX/output/XXXXXXTests-batch-1                                                                                       |
| output_files                                   | report.html,report.junit                                                                                                                        |
| buildlog_path                                  | fastlane/logs                                                                                                                                   |
| include_simulator_logs                         | false                                                                                                                                           |
| derived_data_path                              | /Users/XXXXXX/workspace/XXXXXX/derivedData                                                                                                      |
| should_zip_build_products                      | false                                                                                                                                           |
| use_clang_report_name                          | false                                                                                                                                           |
| disable_concurrent_testing                     | true                                                                                                                                            |
| skip_build                                     | false                                                                                                                                           |
| xcargs                                         |  -parallel-testing-enabled NO -resultBundlePath '/Users/XXXXXX/workspace/XXXXXX/output/XXXXXXTests-batch-1/report.xcresult'                     |
| slack_use_webhook_configured_username_and_icon | false                                                                                                                                           |
| slack_username                                 | fastlane                                                                                                                                        |
| slack_icon_url                                 | https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png                                                                                  |
| skip_slack                                     | false                                                                                                                                           |
| slack_only_on_failure                          | false                                                                                                                                           |
| xcodebuild_command                             | env NSUnbufferedIO=YES xcodebuild                                                                                                               |
| xcode_path                                     | /Applications/Xcode-11.3.1.app                                                                                                                  |
| build_for_testing                              | false                                                                                                                                           |
| result_bundle                                  | true                                                                                                                                            |
+------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+
[12:47:12]: Resetting iPhone 11                                                                                                                                                                    
[12:47:13]: Disabling 'Slide to Type' iPhone 11
LSOpenURLsWithRole() failed for the application /Applications/Xcode-11.3.1.app/Contents/Developer/Applications/Simulator.app with error -610.                                                                                                                                           
[12:47:13]: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -destination 'platform=iOS Simulator,id=XXXXXXX' -derivedDataPath '/Users/XXXXX/workspace/XXXXX/derivedData' -resultBundlePath '/Users/XXXXX/workspace/XXXXX/output/XXXXXTests-batch-1/XXXXXUnitTests.xcresult' -disable-concurrent-testing -xctestrun '/Users/XXXXX/workspace/XXXXX/derivedData/Build/Products/XXXXXUnitTests_iphonesimulator13.2-x86_64.xctestrun'  -parallel-testing-enabled NO -resultBundlePath '/Users/XXXXX/workspace/XXXXX/output/XXXXXTests-batch-1/report.xcresult'

error: option '-resultBundlePath' may only be provided once

鈾伙笍 multi_scan 馃悶bug

All 7 comments

@b3hni4 do you have a Scanfile with result_bundle set to true? You can see that the table summarizing the parameters includes a result_bundle option set to true.

No, we don't have a Scanfile. But we do use setup_jenkins from fastlane in which the default value for result_bundle is set to be true.

We set the result_bundle to false in setup_jenkins and now it works.

Yes, I'll have to make sure that I clear out that environment variable (and others that I may not be clearing out and need to).

@b3hni4 can you test this with result_bundle set to true in the setup_jenkins action?

If so, modify your Pluginfile per my instructions below, run bundle install, and then run your fastlane again (with the --verbose flag).

Pluginfile:

gem 'fastlane-plugin-test_center', :git => "https://github.com/lyndsey-ferguson/fastlane-plugin-test_center.git", :branch => "issue-207-fix-double-result-bundle-path"

If there are still problems, please let me know and attach the console output as a text file to this issue (makes it easier for me to review). If it works, please let me know.

@lyndsey-ferguson I have tried it with the default value for result_bundle to be True and it works. Thanks.

Fixed in v3.10.0

Was this page helpful?
0 / 5 - 0 ratings