From 35b9e3b0aec2c4a3a42602b79df9fc05edd71e72 Mon Sep 17 00:00:00 2001 From: Steve Kirkland Date: Mon, 4 Nov 2024 20:38:26 +0000 Subject: [PATCH] Invoke/kill the XcFramework app --- features/steps/app_steps.rb | 7 ++++++- features/support/env.rb | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/features/steps/app_steps.rb b/features/steps/app_steps.rb index 1f55c8db9..7370f3352 100644 --- a/features/steps/app_steps.rb +++ b/features/steps/app_steps.rb @@ -161,7 +161,12 @@ def run_macos_app Process.waitpid $fixture_pid end dir = 'features/fixtures/macos/output' - exe = "#{dir}/macOSTestApp.app/Contents/MacOS/macOSTestApp" + if ENV['RUN_XCFRAMEWORK_APP'] + exe = "#{dir}/macOSTestAppXcFramework.app/Contents/MacOS/macOSTestAppXcFramework" + else + exe = "#{dir}/macOSTestApp.app/Contents/MacOS/macOSTestApp" + end + system("unzip -qd #{dir} #{dir}/macOSTestApp*.zip", exception: true) unless File.exist? exe $fixture_pid = Process.spawn($app_env, exe, %i[err out] => '/dev/null') end diff --git a/features/support/env.rb b/features/support/env.rb index 4697613bc..d3dbee033 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -148,9 +148,10 @@ def skip_between(os, version_lo, version_hi) Process.waitpid $fixture_pid $fixture_pid = nil sleep 1 # prevent log bleed between scenarios due to second precision of --start + app = ENV['RUN_XCFRAMEWORK_APP'] ? 'macOSTestAppXcFramework' : 'macOSTestApp' log = Process.spawn( '/usr/bin/log', 'show', '--style', 'syslog', '--predicate', - 'eventMessage contains "macOSTestApp" OR process == "macOSTestApp"', + "eventMessage contains \"#{app}\" OR process == \"#{app}\"", '--start', $started_at.strftime('%Y-%m-%d %H:%M:%S%z'), out: File.open(File.join(path, 'device.log'), 'w') )