aboutsummaryrefslogtreecommitdiffstats
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 00000000..0c21cb9c
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,28 @@
+root_includes = include_directories('../subprojects')
+
+srcs = [
+ 'tests.c',
+]
+
+mocks = [
+ '-Wl,--wrap=physunmap',
+ '-Wl,--wrap=physmap',
+ '-Wl,--gc-sections',
+]
+
+flashrom_tests = executable('flashrom_unit_tests',
+ srcs,
+ include_directories : root_includes,
+ c_args : [
+ cargs,
+ '-ffunction-sections',
+ '-fdata-sections',
+ # '-DSTANDALONE',
+ '-DCONFIG_DEFAULT_PROGRAMMER=PROGRAMMER_DUMMY',
+ '-DCONFIG_DEFAULT_PROGRAMMER_ARGS=""',
+ ],
+ export_dynamic : true,
+ link_args : mocks,
+ dependencies : [cmocka_dep, flashrom_test_dep],
+)
+test('cmocka test flashrom', flashrom_tests)