From 3e79ed5376b2851ec60112ad6dbf1be4ac3909e5 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 15 Oct 2023 18:40:11 +0200 Subject: [PATCH 1/6] Replace gtest macro INSTANTIATE_TEST_CASE_P (deprecated) by INSTANTIATE_TEST_SUITE_P --- test/error_in_creator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/error_in_creator.cpp b/test/error_in_creator.cpp index e980a39ce..2dc2cbf7b 100644 --- a/test/error_in_creator.cpp +++ b/test/error_in_creator.cpp @@ -184,10 +184,10 @@ TEST_P(FaultyItemErrorTest, faultyItem) // It would be more natural to put the `#if defined` only around the // discarded values, but when crosscompiling on Windows, compiler fail to -// understand ``#if defined` when used inside the `INSTANTIATE_TEST_CASE_P` +// understand ``#if defined` when used inside the `INSTANTIATE_TEST_SUITE_P` // macro. I suspect some macro definition conflicts. #if defined(ENABLE_XAPIAN) -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( CreatorError, FaultyItemErrorTest, ::testing::Values( @@ -200,7 +200,7 @@ ::testing::Values( ERRORKIND::GET_INDEXDATA )); #else -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( CreatorError, FaultyItemErrorTest, ::testing::Values( @@ -354,10 +354,10 @@ TEST_P(FaultyDelayedItemErrorTest, faultyUnfinishedCreator) } // It would be more natural to put the `#if defined` only around the // discarded values, but when crosscompiling on Windows, compiler fail to -// understand ``#if defined` when used inside the `INSTANTIATE_TEST_CASE_P` +// understand ``#if defined` when used inside the `INSTANTIATE_TEST_SUITE_P` // macro. I suspect some macro definition conflicts. #if defined(ENABLE_XAPIAN) -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( CreatorError, FaultyDelayedItemErrorTest, ::testing::Values( @@ -372,7 +372,7 @@ ::testing::Values( ERRORKIND::GET_INDEXDATA_POSITION )); #else -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( CreatorError, FaultyDelayedItemErrorTest, ::testing::Values( From 728f32901b349eb81bb28bd5611cee0b6c6c8970 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 15 Oct 2023 18:43:41 +0200 Subject: [PATCH 2/6] Replace gtest macro TYPED_TEST_CASE (deprecated) by TYPED_TEST_SUITE --- test/compression.cpp | 2 +- test/decoderstreamreader.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/compression.cpp b/test/compression.cpp index a87d540d1..ff8183e19 100644 --- a/test/compression.cpp +++ b/test/compression.cpp @@ -39,7 +39,7 @@ using CompressionAlgo = ::testing::Types< ZSTD_INFO >; -TYPED_TEST_CASE(CompressionTest, CompressionAlgo); +TYPED_TEST_SUITE(CompressionTest, CompressionAlgo); TYPED_TEST(CompressionTest, compress) { std::string data; diff --git a/test/decoderstreamreader.cpp b/test/decoderstreamreader.cpp index aa740b4fe..a310fb617 100644 --- a/test/decoderstreamreader.cpp +++ b/test/decoderstreamreader.cpp @@ -60,7 +60,7 @@ using CompressionTypes = ::testing::Types< ZSTD_INFO >; -TYPED_TEST_CASE(DecoderStreamReaderTest, CompressionTypes); +TYPED_TEST_SUITE(DecoderStreamReaderTest, CompressionTypes); TYPED_TEST(DecoderStreamReaderTest, justCompressedData) { typedef typename TestFixture::CompressionInfo CompressionInfo; From 886186b5863d5c196059258063b0691d829f2812 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 16 Oct 2023 14:51:08 +0200 Subject: [PATCH 3/6] Check the version of gtest in meson. --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f28595599..5cc59591c 100644 --- a/meson.build +++ b/meson.build @@ -80,7 +80,7 @@ else icu_dep = dependency('icu-i18n', required:false, static:static_linkage) endif -gtest_dep = dependency('gtest', main:true, fallback:['gtest', 'gtest_main_dep'], required:false) +gtest_dep = dependency('gtest', version: '>=1.10.0', main:true, fallback:['gtest', 'gtest_main_dep'], required:false) inc = include_directories('include') From abfb0e7915126baa7bd269e04cdc51c6989c0318 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 16 Oct 2023 14:51:58 +0200 Subject: [PATCH 4/6] Update gtest wrap file. Use last version 1.14.0-1 --- subprojects/gtest.wrap | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/subprojects/gtest.wrap b/subprojects/gtest.wrap index ba9c9b95f..8c067ff20 100644 --- a/subprojects/gtest.wrap +++ b/subprojects/gtest.wrap @@ -1,10 +1,16 @@ [wrap-file] -directory = googletest-release-1.8.1 +directory = googletest-1.14.0 +source_url = https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz +source_filename = gtest-1.14.0.tar.gz +source_hash = 8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7 +patch_filename = gtest_1.14.0-1_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/gtest_1.14.0-1/get_patch +patch_hash = 2e693c7d3f9370a7aa6dac802bada0874d3198ad4cfdf75647b818f691182b50 +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/gtest_1.14.0-1/gtest-1.14.0.tar.gz +wrapdb_version = 1.14.0-1 -source_url = https://github.com/google/googletest/archive/release-1.8.1.zip -source_filename = gtest-1.8.1.zip -source_hash = 927827c183d01734cc5cfef85e0ff3f5a92ffe6188e0d18e909c5efebf28a0c7 - -patch_url = https://wrapdb.mesonbuild.com/v1/projects/gtest/1.8.1/1/get_zip -patch_filename = gtest-1.8.1-1-wrap.zip -patch_hash = f79f5fd46e09507b3f2e09a51ea6eb20020effe543335f5aee59f30cc8d15805 +[provide] +gtest = gtest_dep +gtest_main = gtest_main_dep +gmock = gmock_dep +gmock_main = gmock_main_dep From 87878a418869277a473f485c2e51f8a622dc430f Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Wed, 1 Nov 2023 12:19:58 +0100 Subject: [PATCH 5/6] Remove Debian Buster (almost deprecated) CI --- .github/workflows/package.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 2f7211c8a..9e02fddf7 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -17,7 +17,6 @@ jobs: distro: - debian-unstable - debian-bullseye - - debian-buster - ubuntu-jammy - ubuntu-focal steps: @@ -56,13 +55,6 @@ jobs: with: args: --no-sign - - uses: legoktm/gh-action-build-deb@debian-buster - if: matrix.distro == 'debian-buster' - name: Build package for debian-buster - id: build-debian-buster - with: - args: --no-sign - - uses: legoktm/gh-action-build-deb@ubuntu-jammy if: matrix.distro == 'ubuntu-jammy' name: Build package for ubuntu-jammy From 419b06f6a96de69a81876158fe95b618a5781b63 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Wed, 1 Nov 2023 12:26:45 +0100 Subject: [PATCH 6/6] Use latest kiwix-build CI container images --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a7f537b5..30ee81359 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,7 +170,7 @@ jobs: HOME: /home/runner runs-on: ubuntu-22.04 container: - image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:38" + image: "ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:2023-10-30" steps: - name: Install dependences