From 29176464defade51f18a316a5d0b0c9642e0931e Mon Sep 17 00:00:00 2001 From: Remi Thebault Date: Thu, 18 May 2023 21:20:31 +0200 Subject: [PATCH] reactivate dub tests Closes: https://github.com/mesonbuild/meson/pull/12143 --- test cases/d/11 dub/meson.build | 7 +++++-- test cases/d/14 dub with deps/meson.build | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/test cases/d/11 dub/meson.build b/test cases/d/11 dub/meson.build index 3bb3d56c0..91955710e 100644 --- a/test cases/d/11 dub/meson.build +++ b/test cases/d/11 dub/meson.build @@ -1,12 +1,15 @@ project('dub-example', 'd') -error('MESON_SKIP_TEST: Dub support is broken at the moment (#11773)') - dub_exe = find_program('dub', required : false) if not dub_exe.found() error('MESON_SKIP_TEST: Dub not found') endif +dub_ver = dub_exe.version() +if dub_ver.version_compare('>1.31.1') and dub_ver.version_compare('<1.35.0') + error('MESON_SKIP_TEST: Incompatible Dub version ' + dub_ver) +endif + urld_dep = dependency('urld', method: 'dub') test_exe = executable('test-urld', 'test.d', dependencies: urld_dep) diff --git a/test cases/d/14 dub with deps/meson.build b/test cases/d/14 dub with deps/meson.build index c8e472bff..2e3bce87d 100644 --- a/test cases/d/14 dub with deps/meson.build +++ b/test cases/d/14 dub with deps/meson.build @@ -1,12 +1,15 @@ project('dub-with-deps-example', ['d']) -error('MESON_SKIP_TEST: Dub support is broken at the moment (#11773)') - dub_exe = find_program('dub', required : false) if not dub_exe.found() error('MESON_SKIP_TEST: Dub not found') endif +dub_ver = dub_exe.version() +if dub_ver.version_compare('>1.31.1') and dub_ver.version_compare('<1.35.0') + error('MESON_SKIP_TEST: Incompatible Dub version') +endif + if meson.get_compiler('d').get_id() == 'gcc' error('MESON_SKIP_TEST: can\'t build dependencies with GDC') elif meson.get_compiler('d').get_id() == 'llvm'