From e9f416b065493fd28bc96e1aeb933e942e5051da Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sat, 30 Dec 2023 21:58:05 +0100 Subject: [PATCH] Run tests in the build directory Test data files are copied into the build directory so that the tests can run there instead of creating new files (e.g. new.icc) in the source directory Bump minimum meson version to 0.64, because we are using fs.copyfile(). --- .github/workflows/build.yml | 4 ++-- meson.build | 2 +- testbed/meson.build | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b78131d1..5d6cce721 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,7 @@ jobs: - name: Install packages run: | sudo apt-get -y install build-essential python3-pip ninja-build - pip install meson==0.59.2 + pip install meson==0.64.0 - name: Build Ubuntu run: | @@ -95,7 +95,7 @@ jobs: - name: Install packages run: | - pip install meson==0.59.2 + pip install meson==0.64.0 - uses: ilammy/msvc-dev-cmd@v1 - name: Build Windows diff --git a/meson.build b/meson.build index 43754ddf1..ec3b62659 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project( 'Little-CMS', 'c', version: '2.16', - meson_version: '>=0.49.0', + meson_version: '>=0.64.0', # default_options: ['c_std=c99'] ) diff --git a/testbed/meson.build b/testbed/meson.build index c35d0faef..c387a0095 100644 --- a/testbed/meson.build +++ b/testbed/meson.build @@ -4,6 +4,17 @@ testcms_srcs = files( 'zoo_icc.c', ) +# copy all iccs to the build dir and run the tests there +iccs = [ + 'bad.icc', 'crayons.icc', 'new.icc', 'test2.icc', 'test4.icc', 'TestCLT.icc', + 'bad_mpe.icc', 'ibm-t61.icc', 'test1.icc', 'test3.icc', 'test5.icc', + 'toosmall.icc' +] +fs=import('fs') +foreach icc : iccs + fs.copyfile(icc) +endforeach + testcms = executable( 'testcms', testcms_srcs, @@ -14,6 +25,6 @@ testcms = executable( test( 'testcms', testcms, - workdir: meson.current_source_dir(), + workdir: meson.current_build_dir(), timeout: 600, )