Skip to content

Commit

Permalink
tests: Omit Gadget suite when Gadget is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
oleavr committed May 3, 2024
1 parent 84cc761 commit 698fbb1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
test_sources = [
'test-system.vala',
'test-gadget.vala',
'test-host-session.vala',
'runner.vala',
'runner-glue.c',
Expand All @@ -10,6 +9,17 @@ test_sources = [
'process-resource-usage.c',
]

test_vala_args = []

if agent_compat != ''
test_vala_args += '--define=CROSS_ARCH'
endif

if build_gadget
test_vala_args += '--define=HAVE_GADGET'
test_sources += 'test-gadget.vala'
endif

subdir('labrats')

system_vala_args = []
Expand All @@ -34,11 +44,6 @@ else
system_vala_args += ['--pkg=posix']
endif

test_vala_args = []
if agent_compat != ''
test_vala_args += '--define=CROSS_ARCH'
endif

frida_tests = static_library('frida-tests', test_sources,
vala_args: [
'--pkg=gmodule-2.0',
Expand Down
2 changes: 1 addition & 1 deletion tests/runner.vala
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace Frida.Test {

Frida.AgentTest.add_tests ();
#endif
#if !WINDOWS
#if HAVE_GADGET && !WINDOWS
Frida.GadgetTest.add_tests ();
#endif
Frida.HostSessionTest.add_tests ();
Expand Down

0 comments on commit 698fbb1

Please sign in to comment.