Skip to content

Commit

Permalink
tests: Ensure Gadget is built before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed May 3, 2024
1 parent ab15e8e commit 1b765eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/gadget/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ elif host_os in ['ios', 'tvos']
else
identity = gadget_name
endif
gadget = custom_target('frida-gadget',
gadget_for_host_arch = custom_target('frida-gadget',
input: modulated_gadget,
output: need_universal_gadget ? f'@gadget_name@-@host_abi@' : gadget_name,
command: post_process + ['shared-library', identity],
Expand All @@ -97,8 +97,8 @@ gadget = custom_target('frida-gadget',
)

if need_universal_gadget
custom_target('frida-gadget-universal',
input: gadget,
gadget = custom_target('frida-gadget-universal',
input: gadget_for_host_arch,
output: gadget_name,
command: [
lipo,
Expand All @@ -111,4 +111,6 @@ if need_universal_gadget
install: true,
install_dir: asset_dir,
)
else
gadget = gadget_for_host_arch
endif
4 changes: 3 additions & 1 deletion tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test_sources = [
]

test_vala_args = []
test_depends = []

if agent_compat != ''
test_vala_args += '--define=CROSS_ARCH'
Expand All @@ -18,6 +19,7 @@ endif
if build_gadget
test_vala_args += '--define=HAVE_GADGET'
test_sources += 'test-gadget.vala'
test_depends += gadget
endif

subdir('labrats')
Expand Down Expand Up @@ -89,5 +91,5 @@ runner = custom_target('frida-tests',
test('core', python,
args: [files('run.py'), runner.full_path()],
timeout: 120,
depends: [runner, labrats],
depends: [runner, labrats, test_depends],
)

0 comments on commit 1b765eb

Please sign in to comment.