Merge branch 'development'

# Conflicts:
#	.github/workflows/msvc.yml
#	test/UnitTest++/Checks.h
#	test/runtests-01.sh
#	test/runtests-O1.sh
#	test/runtests-O2.sh
#	test/runtests-O3.sh
#	test/runtests-c++14.sh
This commit is contained in:
John Wellbelove 2023-04-02 11:26:37 +01:00
commit d30992852e
10 changed files with 871 additions and 31 deletions

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
@ -24,7 +24,7 @@ jobs:
export CXX=clang++
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
git fetch --tags
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=20 ./
clang --version
make
@ -36,7 +36,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
@ -49,7 +49,7 @@ jobs:
export CXX=clang++
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
git fetch --tags
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=20 ./
clang --version
make
@ -61,7 +61,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
@ -74,7 +74,7 @@ jobs:
export CXX=clang++
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
git fetch --tags
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON ./
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=20 ./
clang --version
make
@ -97,7 +97,7 @@ jobs:
export CXX=clang++
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
git fetch --tags
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=20 ./
clang --version
make
@ -120,7 +120,7 @@ jobs:
export CXX=clang++
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
git fetch --tags
cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -D BUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=20 ./
clang --version
make
@ -143,7 +143,7 @@ jobs:
export CXX=clang++
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
git fetch --tags
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON ./
cmake -D BUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=20 ./
clang --version
make

View File

@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
@ -20,7 +20,7 @@ jobs:
run: |
git fetch --tags
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=20 ./
gcc --version
make
@ -32,7 +32,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
@ -41,7 +41,7 @@ jobs:
run: |
git fetch --tags
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=20 ./
gcc --version
make
@ -53,7 +53,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
@ -62,7 +62,7 @@ jobs:
run: |
git fetch --tags
export ASAN_OPTIONS=alloc_dealloc_mismatch=0,detect_leaks=0
cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON ./
cmake -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=20 ./
gcc --version
make

View File

@ -22,7 +22,7 @@ jobs:
- name: Build
run: |
git fetch --tags
cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=20 ./
MSBuild.exe -version
MSBuild.exe .\etl.sln
@ -44,7 +44,7 @@ jobs:
- name: Build
run: |
git fetch --tags
cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF ./
cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=OFF -DETL_CXX_STANDARD=17 ./
MSBuild.exe -version
MSBuild.exe .\etl.sln
@ -67,7 +67,7 @@ jobs:
- name: Build
run: |
git fetch --tags
cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON ./
cmake -G "Visual Studio 17 2022" -AWin32 -DBUILD_TESTS=ON -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03=ON -DETL_CXX_STANDARD=17 ./
MSBuild.exe -version
MSBuild.exe .\etl.sln

View File

@ -33,8 +33,9 @@ SOFTWARE.
#include "platform.h"
//*************************************
// Figure out if we can use the standard library <new> header, if haven't already done so in etl_profile.h
//*****************************************************************************
// Figure out if we can use the standard library <new> header, if haven't already done so.
//*****************************************************************************
#if !defined(ETL_USING_STD_NEW)
#if defined(__has_include)
#if __has_include(<new>)
@ -52,9 +53,11 @@ SOFTWARE.
#if ETL_USING_STD_NEW
#include <new>
#else
// Define placement new if no new header is available
inline void* operator new(size_t, void* p) { return p; }
inline void* operator new[](size_t, void* p) { return p; }
//*****************************************************************************
// Define placement new if no new header is available.
//*****************************************************************************
inline void* operator new(size_t, void* p) ETL_NOEXCEPT { return p; }
inline void* operator new[](size_t, void* p) ETL_NOEXCEPT { return p; }
inline void operator delete(void*, void*) ETL_NOEXCEPT {}
inline void operator delete[](void*, void*) ETL_NOEXCEPT{}

View File

@ -348,6 +348,13 @@ target_include_directories(etl_tests
add_subdirectory(UnitTest++)
target_link_libraries(etl_tests PRIVATE UnitTestpp)
if ((CMAKE_CXX_COMPILER_ID MATCHES "MSVC"))
target_compile_options(etl_tests
PRIVATE
/Zc:__cplusplus
)
endif ()
if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
target_compile_options(etl_tests
PRIVATE

View File

@ -18,9 +18,9 @@
namespace UnitTest
{
template <typename TChar>
typename std::enable_if<!std::is_pointer<TChar>::value, std::string>::type
DisplayValue(const TChar& c)
template <typename T>
typename std::enable_if<!std::is_pointer<T>::value, std::string>::type
DisplayValue(const T& c)
{
std::ostringstream oss;
@ -93,8 +93,8 @@ namespace UnitTest
}
#endif
template <typename TChar>
std::string DisplayValue(const TChar* c)
template <typename T>
std::string DisplayValue(const T* c)
{
std::ostringstream oss;

348
test/runtests-O1.sh Normal file
View File

@ -0,0 +1,348 @@
#!/bin/sh
clear
mkdir -p build-make || exit 1
cd build-make || exit 1
echo "ETL Tests" > log.txt
opt="-O0"
cxx_standard="14"
#******************************************************************************
# GCC
#******************************************************************************
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - STL" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - STL - Force C++03" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - No STL" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
#******************************************************************************
# CLANG
#******************************************************************************
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - STL" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - STL - Force C++03" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=ON -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - No STL" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DNO_STL=ON -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Initializer list test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../etl_initializer_list/
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed initializer_list Compilation >>>>"
else
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Initializer list test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed initializer_list Compilation >>>>"
else
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'log_errors' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'log_errors and exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'log_errors' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'log_errors and exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt -DETL_CXX_STANDARD=$cxx_standard ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
cd ../..
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " All Tests Completed OK" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt

238
test/runtests-O2.sh Normal file
View File

@ -0,0 +1,238 @@
#!/bin/sh
clear
mkdir -p build-make || exit 1
cd build-make || exit 1
echo "ETL Tests" > log.txt
opt="-O2"
#******************************************************************************
# GCC
#******************************************************************************
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - STL" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Initializer list test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../etl_initializer_list/
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed initializer_list Compilation >>>>"
else
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Initializer list test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed initializer_list Compilation >>>>"
else
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'log_errors' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'log_errors and exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'log_errors' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'log_errors and exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
cd ../..
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " All Tests Completed OK" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt

238
test/runtests-O3.sh Normal file
View File

@ -0,0 +1,238 @@
#!/bin/sh
clear
mkdir -p build-make || exit 1
cd build-make || exit 1
echo "ETL Tests" > log.txt
opt="-O3"
#******************************************************************************
# GCC
#******************************************************************************
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - STL" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DNO_STL=OFF -DETL_USE_TYPE_TRAITS_BUILTINS=OFF -DETL_USER_DEFINED_TYPE_TRAITS=OFF -DETL_FORCE_TEST_CPP03_IMPLEMENTATION=OFF -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Compilation >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Initializer list test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../etl_initializer_list/
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed initializer_list Compilation >>>>"
else
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Initializer list test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed initializer_list Compilation >>>>"
else
echo "****************\n**** Failed initializer_list ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'log_errors' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " GCC - Error macros 'log_errors and exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
gcc --version | grep gcc | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="g++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'log_errors' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " Clang - Error macros 'log_errors and exceptions' test" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt
cd ../../../etl_error_handler/log_errors_and_exceptions
mkdir -p build-make || exit 1
cd build-make || exit 1
rm * -rf
clang --version | grep clang | tee -a log.txt
cmake -DCMAKE_CXX_COMPILER="clang++" -DETL_OPTIMISATION=$opt ..
make -j4
if [ $? -eq 0 ]; then
echo "<<<< Passed Error macros 'log_errors and exceptions' Compilation >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
./etl_tests
if [ $? -eq 0 ]; then
echo "<<<< Passed Tests >>>>"
else
echo "****************\n**** Failed Error macros 'log_errors and exceptions' ****\n****************" | tee -a ../log.txt
exit $?
fi
cd ../..
echo ""
echo "-----------------------------------------------" | tee -a log.txt
echo " All Tests Completed OK" | tee -a log.txt
echo "-----------------------------------------------" | tee -a log.txt

View File

@ -3514,13 +3514,19 @@
<None Include="..\meson.build">
<Filter>Tests\Test Support</Filter>
</None>
<None Include="..\runtests-01.sh">
<None Include="..\..\.github\workflows\msvc.yml">
<Filter>Resource Files\CI\Github</Filter>
</None>
<None Include="..\runtests-c++14.sh">
<Filter>Tests\Scripts</Filter>
</None>
<None Include="..\runtests-03.sh">
<None Include="..\runtests-O1.sh">
<Filter>Tests\Scripts</Filter>
</None>
<None Include="..\runtests-02.sh">
<None Include="..\runtests-O2.sh">
<Filter>Tests\Scripts</Filter>
</None>
<None Include="..\runtests-O3.sh">
<Filter>Tests\Scripts</Filter>
</None>
<None Include="..\..\.github\workflows\msvc.yml">