Skip to content

Commit

Permalink
Rename test_plan_path to xctestrun_path to reflect its contents
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Jul 7, 2022
1 parent 1378660 commit c6596fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fastlane/lanes/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
# Find the referenced .xctestrun file based on its name
build_products_path = File.join(DERIVED_DATA_PATH, 'Build', 'Products')

test_plan_path = Dir.glob(File.join(build_products_path, '*.xctestrun')).select do |path|
xctestrun_path = Dir.glob(File.join(build_products_path, '*.xctestrun')).select do |path|
path.include?(options[:name])
end.first

UI.user_error!("Unable to find .xctestrun file at #{build_products_path}") if test_plan_path.nil? || !File.exist?((test_plan_path))
UI.user_error!("Unable to find .xctestrun file at #{build_products_path}") if xctestrun_path.nil? || !File.exist?((xctestrun_path))

run_tests(
workspace: WORKSPACE_PATH,
Expand All @@ -75,7 +75,7 @@
deployment_target_version: options[:ios_version],
ensure_devices_found: true,
test_without_building: true,
xctestrun: test_plan_path,
xctestrun: xctestrun_path,
output_directory: File.join(PROJECT_ROOT_FOLDER, 'build', 'results'),
reset_simulator: true,
result_bundle: true
Expand Down

0 comments on commit c6596fb

Please sign in to comment.