Anastasia Klimchuk submitted this change.

View Change



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved Thomas Heijligen: Looks good to me, approved Angel Pons: Looks good to me, approved Anastasia Klimchuk: Looks good to me, approved
Revert "cmocka: Drop as meson subproject"

This reverts commit 99eca0899b931b21b7c44ed1753c5f01b35798af.

The environment provided by our Jenkins builder doesn't have cmocka.
It's not exactly known why it worked as a subproject. However, if it
allows us to enforce tests in the CI, we should revert now and drop
the subproject again once the environment is updated.

Change-Id: Iafdab92eb8ab96d02fb2c29524d785bdc7a54034
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67345
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M meson.build
A subprojects/cmocka.wrap
M tests/meson.build
3 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 3a60f92..366ce18 100644
--- a/meson.build
+++ b/meson.build
@@ -500,7 +500,11 @@
# `.allowed()` gets introduced in 0.59.0
if get_option('tests').auto() or get_option('tests').enabled()
# unit-test framework
- cmocka = dependency('cmocka', required : get_option('tests'))
+ cmocka_dep = dependency(
+ 'cmocka',
+ fallback: ['cmocka', 'cmocka_dep'],
+ required : get_option('tests')
+ )

flashrom_test_dep = declare_dependency(
include_directories : include_dir,
@@ -519,7 +523,7 @@
],
)

- if cmocka.found()
+ if cmocka_dep.found()
subdir('tests')
endif
endif
diff --git a/subprojects/cmocka.wrap b/subprojects/cmocka.wrap
new file mode 100644
index 0000000..21e84f9
--- /dev/null
+++ b/subprojects/cmocka.wrap
@@ -0,0 +1,10 @@
+[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 2f4e33d..b629998 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -114,6 +114,6 @@
],
export_dynamic : true,
link_args : mocks,
- dependencies : [cmocka, flashrom_test_dep],
+ dependencies : [cmocka_dep, flashrom_test_dep],
)
test('cmocka test flashrom', flashrom_tests)

To view, visit change 67345. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Iafdab92eb8ab96d02fb2c29524d785bdc7a54034
Gerrit-Change-Number: 67345
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged