[Spice-devel] [PATCH] catch: directory is now catch2

Uri Lublin uril at redhat.com
Wed Jan 30 12:52:20 UTC 2019


On 1/29/19 5:53 PM, Frediano Ziglio wrote:
>> Upstream and since Fedora 27
>>
>> Signed-off-by: Uri Lublin <uril at redhat.com>
> 
> Does it work on RHEL7 ?

Only if RHEL-7 has catch2.
If not see another option below.

> 
>> ---
>>
>> Another option is to check both catch/ and catch2/
>> and pick the one that is installed on the system, if any
>>

Uri.


>> ---
>>   configure.ac                          | 4 ++--
>>   src/unittests/test-mjpeg-fallback.cpp | 2 +-
>>   src/unittests/test-stream-port.cpp    | 2 +-
>>   3 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index c259f7e..321dea3 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -119,9 +119,9 @@ case "$enable_tests" in
>>     *) AC_MSG_ERROR([bad value ${enable_tests} for enable-tests option]) ;;
>>   esac
>>   AS_IF([test "x$enable_tests" != "xno"],
>> -      [AC_CHECK_HEADER([catch/catch.hpp],have_check="yes",)])
>> +      [AC_CHECK_HEADER([catch2/catch.hpp],have_check="yes",)])
>>   AS_IF([test "x$enable_tests" = "xyes" && test "x$have_check" != "xyes"],
>> -      [AC_MSG_ERROR([Could not find Catch dependency header
>> (catch/catch.hpp)])])
>> +      [AC_MSG_ERROR([Could not find Catch dependency header
>> (catch2/catch.hpp)])])
>>   AM_CONDITIONAL([ENABLE_TESTS], [test "x$have_check" = "xyes"])
>>   
>>   AC_DEFINE_DIR([BINDIR], [bindir], [Where binaries are installed.])
>> diff --git a/src/unittests/test-mjpeg-fallback.cpp
>> b/src/unittests/test-mjpeg-fallback.cpp
>> index e39dc49..6a73dbe 100644
>> --- a/src/unittests/test-mjpeg-fallback.cpp
>> +++ b/src/unittests/test-mjpeg-fallback.cpp
>> @@ -1,5 +1,5 @@
>>   #define CATCH_CONFIG_MAIN
>> -#include "catch/catch.hpp"
>> +#include "catch2/catch.hpp"
>>   
>>   #include "mjpeg-fallback.hpp"
>>   
>> diff --git a/src/unittests/test-stream-port.cpp
>> b/src/unittests/test-stream-port.cpp
>> index e7b7b89..6bae7fa 100644
>> --- a/src/unittests/test-stream-port.cpp
>> +++ b/src/unittests/test-stream-port.cpp
>> @@ -5,7 +5,7 @@
>>    */
>>   
>>   #define CATCH_CONFIG_MAIN
>> -#include <catch/catch.hpp>
>> +#include <catch2/catch.hpp>
>>   #include <sys/socket.h>
>>   #include <signal.h>
>>   
> 
> Frediano
> 



More information about the Spice-devel mailing list