From 368d033ce5c15c6848dc0ef14f888f96908dd980 Mon Sep 17 00:00:00 2001 From: Thomas Lauf Date: Mon, 2 Mar 2020 21:41:42 +0100 Subject: [PATCH] Rename `atomic` to `AtomicFileTest` - Avoid possible clash with lib atomic on macOS, e.g. in /Library/Developer/CommandLineTools/usr/include/c++/v1/memory:668 Signed-off-by: Thomas Lauf --- test/.gitignore | 2 +- test/AtomicFile.t | 14 ++++++++++++++ test/{atomic.cpp => AtomicFileTest.cpp} | 2 +- test/CMakeLists.txt | 3 +-- test/atomic.t | 14 -------------- 5 files changed, 17 insertions(+), 18 deletions(-) create mode 100755 test/AtomicFile.t rename test/{atomic.cpp => AtomicFileTest.cpp} (99%) delete mode 100755 test/atomic.t diff --git a/test/.gitignore b/test/.gitignore index 2840bade..815e2bb0 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,5 +1,5 @@ all.log -atomic +AtomicFileTest data.t exclusion.t helper.t diff --git a/test/AtomicFile.t b/test/AtomicFile.t new file mode 100755 index 00000000..b1f6f8ff --- /dev/null +++ b/test/AtomicFile.t @@ -0,0 +1,14 @@ +#!/bin/sh +BASEDIR=$(dirname "$0") + +if [ "$(uname -s)" = "Darwin" ] ; then + DLL_TOOL="otool -L" +else + DLL_TOOL="ldd" +fi + +if ${DLL_TOOL} ${BASEDIR}/AtomicFileTest | grep -q 'libfiu' ; then + exec fiu-run -x ${BASEDIR}/AtomicFileTest +else + exec ${BASEDIR}/AtomicFileTest +fi diff --git a/test/atomic.cpp b/test/AtomicFileTest.cpp similarity index 99% rename from test/atomic.cpp rename to test/AtomicFileTest.cpp index f0afd2af..d6870625 100644 --- a/test/atomic.cpp +++ b/test/AtomicFileTest.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include #include diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c98c6b26..5fbafc23 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -34,7 +34,7 @@ include_directories (${CMAKE_SOURCE_DIR} include_directories (${CMAKE_INSTALL_PREFIX}/include) link_directories(${CMAKE_INSTALL_PREFIX}/lib) -set (test_SRCS atomic data.t exclusion.t helper.t interval.t range.t rules.t util.t TagInfoDatabase.t) +set (test_SRCS AtomicFileTest data.t exclusion.t helper.t interval.t range.t rules.t util.t TagInfoDatabase.t) add_custom_target (test ./run_all --verbose DEPENDS ${test_SRCS} @@ -47,4 +47,3 @@ endforeach (src_FILE) configure_file(run_all run_all COPYONLY) configure_file(problems problems COPYONLY) - diff --git a/test/atomic.t b/test/atomic.t deleted file mode 100755 index 331498e4..00000000 --- a/test/atomic.t +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -BASEDIR=$(dirname "$0") - -if [ "$(uname -s)" = "Darwin" ] ; then - DLL_TOOL="otool -L" -else - DLL_TOOL="ldd" -fi - -if ${DLL_TOOL} ${BASEDIR}/atomic | grep -q 'libfiu' ; then - exec fiu-run -x ${BASEDIR}/atomic -else - exec ${BASEDIR}/atomic -fi