From be8658922255937273555384bade52591f306390 Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Wed, 15 Nov 2023 09:55:14 -0700 Subject: [PATCH] uri_signing cmake: clean up unit test cmake and change suggested github repo (#10723) * uri_signing cmake: push all cjose/jansson logic into the plugin CMakeLists * update uri_signing to use UNITTEST --- doc/admin-guide/plugins/uri_signing.en.rst | 4 ++-- plugins/experimental/uri_signing/Makefile.inc | 2 +- plugins/experimental/uri_signing/common.cc | 2 +- plugins/experimental/uri_signing/common.h | 2 +- plugins/experimental/uri_signing/unit_tests/CMakeLists.txt | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/admin-guide/plugins/uri_signing.en.rst b/doc/admin-guide/plugins/uri_signing.en.rst index 8dc99d595dc..ec144e59ead 100644 --- a/doc/admin-guide/plugins/uri_signing.en.rst +++ b/doc/admin-guide/plugins/uri_signing.en.rst @@ -203,7 +203,7 @@ Building To build from source, you will need these libraries installed: - - `cjose `_ + - `cjose `_ - `jansson `_ - pcre - OpenSSL @@ -253,7 +253,7 @@ If using local cjose: .. code-block:: Bash cd ${HOME}/git - git clone https://github.com/cisco/cjose.git + git clone https://github.com/OpenIDC/cjose.git cd cjose autoreconf -i ./configure --with-jansson=${HOME}/git/jansson --disable-shared CC="gcc -fpic" diff --git a/plugins/experimental/uri_signing/Makefile.inc b/plugins/experimental/uri_signing/Makefile.inc index 828fa7f1d37..1278c8dc9b6 100644 --- a/plugins/experimental/uri_signing/Makefile.inc +++ b/plugins/experimental/uri_signing/Makefile.inc @@ -33,7 +33,7 @@ check_PROGRAMS += experimental/uri_signing/test_uri_signing experimental_uri_signing_test_uri_signing_CPPFLAGS = \ $(AM_CPPFLAGS) \ -I$(abs_top_srcdir)/lib/catch2 \ - -DURI_SIGNING_UNIT_TEST \ + -DUNITTEST \ -DSRCDIR=\"$(srcdir)\" experimental_uri_signing_test_uri_signing_LDADD = @LIBJANSSON@ @LIBCJOSE@ @LIBPCRE@ -lm -lcrypto diff --git a/plugins/experimental/uri_signing/common.cc b/plugins/experimental/uri_signing/common.cc index 04dce66dc2d..a256d66f1e2 100644 --- a/plugins/experimental/uri_signing/common.cc +++ b/plugins/experimental/uri_signing/common.cc @@ -18,7 +18,7 @@ #include "common.h" -#ifdef URI_SIGNING_UNIT_TEST +#ifdef UNITTEST void PrintToStdErr(const char *fmt, ...) diff --git a/plugins/experimental/uri_signing/common.h b/plugins/experimental/uri_signing/common.h index e4d474c0cf6..2e8d8ccca3f 100644 --- a/plugins/experimental/uri_signing/common.h +++ b/plugins/experimental/uri_signing/common.h @@ -20,7 +20,7 @@ #define PLUGIN_NAME "uri_signing" -#ifdef URI_SIGNING_UNIT_TEST +#ifdef UNITTEST #include #include diff --git a/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt b/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt index 0cca0ae7099..e53460ff8b7 100644 --- a/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt +++ b/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt @@ -27,7 +27,6 @@ add_executable( ${PROJECT_SOURCE_DIR}/normalize.cc ${PROJECT_SOURCE_DIR}/parse.cc ${PROJECT_SOURCE_DIR}/timing.cc - ${PROJECT_SOURCE_DIR}/uri_signing.cc ) target_compile_definitions(uri_signing_test PRIVATE UNITTEST) target_include_directories(uri_signing_test PRIVATE ${PROJECT_SOURCE_DIR})