summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2022-08-12 19:57:28 +0200
committerThomas Heijligen <src@posteo.de>2022-08-17 18:49:59 +0000
commit99eca0899b931b21b7c44ed1753c5f01b35798af (patch)
treedda506e0c50c02be8a800d4cbec26510e955eb3d
parent4ad591bcdc80951bec31177bd45cd265afde721a (diff)
downloadflashrom-99eca0899b931b21b7c44ed1753c5f01b35798af.tar.gz
flashrom-99eca0899b931b21b7c44ed1753c5f01b35798af.tar.bz2
flashrom-99eca0899b931b21b7c44ed1753c5f01b35798af.zip
cmocka: Drop as meson subproject
Depend exclusive on the cmocka package provided by the build environment. Cmocka is widely available in Linux distributions and BSD systems. Besides that, it is suboptimal to fetch own dependencies in the build process. Most packaging systems even forbid fetching additional assets at build time. Change-Id: I751c85d5f72e47356113cf55dfbaec73cbd8028c Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66696 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
-rw-r--r--meson.build8
-rw-r--r--subprojects/cmocka.wrap10
-rw-r--r--tests/meson.build2
3 files changed, 3 insertions, 17 deletions
diff --git a/meson.build b/meson.build
index bea55858b..8eb65a8ae 100644
--- a/meson.build
+++ b/meson.build
@@ -495,11 +495,7 @@ subdir('util')
# `.allowed()` gets introduced in 0.59.0
if get_option('tests').auto() or get_option('tests').enabled()
# unit-test framework
- cmocka_dep = dependency(
- 'cmocka',
- fallback: ['cmocka', 'cmocka_dep'],
- required : get_option('tests')
- )
+ cmocka = dependency('cmocka', required : get_option('tests'))
flashrom_test_dep = declare_dependency(
include_directories : include_dir,
@@ -518,7 +514,7 @@ if get_option('tests').auto() or get_option('tests').enabled()
],
)
- if cmocka_dep.found()
+ if cmocka.found()
subdir('tests')
endif
endif
diff --git a/subprojects/cmocka.wrap b/subprojects/cmocka.wrap
deleted file mode 100644
index 21e84f996..000000000
--- a/subprojects/cmocka.wrap
+++ /dev/null
@@ -1,10 +0,0 @@
-[wrap-file]
-directory = cmocka-1.1.5
-
-source_url = https://cmocka.org/files/1.1/cmocka-1.1.5.tar.xz
-source_filename = cmocka-1.1.5.tar.xz
-source_hash = f0ccd8242d55e2fd74b16ba518359151f6f8383ff8aef4976e48393f77bba8b6
-
-patch_url = https://wrapdb.mesonbuild.com/v1/projects/cmocka/1.1.5/3/get_zip
-patch_filename = cmocka-1.1.5-3-wrap.zip
-patch_hash = 81ce48613680d3c3a0b396ac570c852b290adcd18202fb16aaf703a9493f4348
diff --git a/tests/meson.build b/tests/meson.build
index 96ca5a689..c0e239224 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -112,6 +112,6 @@ flashrom_tests = executable('flashrom_unit_tests',
],
export_dynamic : true,
link_args : mocks,
- dependencies : [cmocka_dep, flashrom_test_dep],
+ dependencies : [cmocka, flashrom_test_dep],
)
test('cmocka test flashrom', flashrom_tests)