From 2c2d78766a9afb7184378294363347107cb9d0dd Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Sat, 25 Oct 2014 17:41:27 +0200 Subject: [PATCH] Generalise unix tests to unixlike operating systems - Rename run_tests_linux.sh to run_tests_unix.sh - Use /bin/sh instead of bash --- CMakeLists.txt | 2 +- scripts/run_tests_linux.sh | 42 ------------------------------------------ scripts/run_tests_unix.sh | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 43 deletions(-) delete mode 100755 scripts/run_tests_linux.sh create mode 100755 scripts/run_tests_unix.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index b628161..8167262 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ if (DEFINED CYGWIN) set(test_script_in run_tests_cygwin.sh) set(test_script_out run_tests.sh) elseif (DEFINED UNIX) - set(test_script_in run_tests_linux.sh) + set(test_script_in run_tests_unix.sh) set(test_script_out run_tests.sh) else() set(test_script_in run_tests_windows.bat) diff --git a/scripts/run_tests_linux.sh b/scripts/run_tests_linux.sh deleted file mode 100755 index 91db2be..0000000 --- a/scripts/run_tests_linux.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2014, Siemens AG. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - - -# Needs to be located in the folder containing the tests!! -# Is copied automatically there when generating build files with cmake. -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -"$DIR/embb_base_c_test" -echo -"$DIR/embb_base_cpp_test" -echo -"$DIR/embb_mtapi_c_test" -echo -"$DIR/embb_mtapi_cpp_test" -echo -"$DIR/embb_algorithms_cpp_test" -echo -"$DIR/embb_containers_cpp_test" -echo -"$DIR/embb_dataflow_cpp_test" diff --git a/scripts/run_tests_unix.sh b/scripts/run_tests_unix.sh new file mode 100755 index 0000000..136d1fd --- /dev/null +++ b/scripts/run_tests_unix.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Copyright (c) 2014, Siemens AG. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + + +# Needs to be located in the folder containing the tests!! +# Is copied automatically there when generating build files with cmake. + +DIR=. + +TESTS="embb_base_c_test embb_base_cpp_test embb_mtapi_c_test \ + embb_mtapi_cpp_test embb_algorithms_cpp_test \ + embb_containers_cpp_test embb_dataflow_cpp_test" + +for TEST in $TESTS; do + $DIR/$TEST; +done -- libgit2 0.26.0