diff --git a/ldc.changes b/ldc.changes index 894483b..e56621e 100644 --- a/ldc.changes +++ b/ldc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 6 11:33:49 UTC 2018 - guillaume.gardet@opensuse.org + +- Add tests, disabled by default (since we are missing python2-lit) + ------------------------------------------------------------------- Wed Jun 6 08:15:36 UTC 2018 - guillaume.gardet@opensuse.org diff --git a/ldc.spec b/ldc.spec index 456d51f..c2edb97 100644 --- a/ldc.spec +++ b/ldc.spec @@ -16,6 +16,7 @@ # %bcond_without ldc_bootstrap +%bcond_with ldc_tests Name: ldc Version: 1.9.0 @@ -36,6 +37,10 @@ Patch12: ldc-0.17.5-add_missing_include.patch Patch13: ldc-0.17.5-default-to-pic.patch %endif BuildRequires: cmake +%if %{with ldc_tests} +BuildRequires: gcc-c++ +BuildRequires: gdb +%endif BuildRequires: help2man BuildRequires: libconfig++-devel BuildRequires: libcurl-devel @@ -48,7 +53,14 @@ BuildRequires: ldc-runtime-devel BuildRequires: llvm-clang BuildRequires: llvm-devel >= 3.7 BuildRequires: ncurses-devel +%if %{with ldc_tests} +BuildRequires: python +%endif BuildRequires: sqlite3-devel +%if %{with ldc_tests} +BuildRequires: timezone +BuildRequires: unzip +%endif BuildRequires: zlib-devel # Should be installed, at least runtime Recommends: ldc-phobos-devel = %{version} @@ -145,6 +157,13 @@ touch no-suse-rules -DCMAKE_CXX_FLAGS="-std=c++11" make %{?_smp_mflags} +%if %{with ldc_tests} +%check +pushd build/ +make test +popd +%endif + %install %cmake_install # Build man pages