Skip to content

Commit

Permalink
Run tests in the build directory
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
Thomas Weber committed Dec 30, 2023
1 parent fe651ef commit e9f416b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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']
)

Expand Down
13 changes: 12 additions & 1 deletion testbed/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -14,6 +25,6 @@ testcms = executable(
test(
'testcms',
testcms,
workdir: meson.current_source_dir(),
workdir: meson.current_build_dir(),
timeout: 600,
)

0 comments on commit e9f416b

Please sign in to comment.