Commit fe5b1039 authored by Reinhard Biegel's avatar Reinhard Biegel
Browse files

Merge branch '102-port-tests-from-qmake-to-cmake' into 'develop'

Resolve "port tests from qmake to cmake"

See merge request !72
parents de32e075 f64b5ea1
Pipeline #5077 passed with stage
in 0 seconds
......@@ -85,7 +85,7 @@ if(WITH_SIMCORE OR WITH_TESTS)
set(Boost_USE_STATIC_LIBS OFF)
find_package(Boost COMPONENTS filesystem REQUIRED)
find_package(Qt5 COMPONENTS Concurrent Core Widgets Xml XmlPatterns REQUIRED)
find_package(Qt5 COMPONENTS Concurrent Core Widgets Xml XmlPatterns Test REQUIRED)
find_package(FMILibrary)
if(WITH_EXTENDED_OSI)
......
......@@ -11,12 +11,17 @@ add_subdirectory(common)
add_subdirectory(components/AlgorithmAEB)
add_subdirectory(components/Algorithm_AFDM)
add_subdirectory(components/Algorithm_ECU)
add_subdirectory(components/Algorithm_FmuWrapper)
add_subdirectory(components/Algorithm_Lateral)
add_subdirectory(components/Algorithm_Longitudinal)
add_subdirectory(components/Algorithm_RouteControl)
add_subdirectory(components/Algorithm_Switch)
add_subdirectory(components/ComponentController)
add_subdirectory(components/Dynamics_Chassis)
add_subdirectory(components/Dynamics_Collision)
add_subdirectory(components/Dynamics_TF)
add_subdirectory(components/Dynamics_TwoTrack)
add_subdirectory(components/LimiterAccVehComp)
add_subdirectory(components/OpenScenarioActions)
add_subdirectory(components/SensorAggregation_OSI)
......
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
set(COMPONENT_TEST_NAME Algorithm_ECU_Tests)
set(COMPONENT_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/components/Algorithm_ECU)
set(COMMONPCM_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/common/pcm)
add_openpass_target(
NAME ${COMPONENT_TEST_NAME} TYPE test COMPONENT module
DEFAULT_MAIN
SOURCES
tst_ut_ecu.cpp
${COMPONENT_SOURCE_DIR}/ecu.cpp
HEADERS
tst_ut_ecu.h
${COMPONENT_SOURCE_DIR}/ecu.h
INCDIRS
${COMPONENT_SOURCE_DIR}
LIBRARIES
Qt5::Core
Qt5::Test
)
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
set(COMPONENT_TEST_NAME Algorithm_Routecontrol_Tests)
set(COMPONENT_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/components/Algorithm_Routecontrol)
set(COMMON_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/common)
add_openpass_target(
NAME ${COMPONENT_TEST_NAME} TYPE test COMPONENT module
SOURCES
tst_ut_RouteControl.cpp
${COMPONENT_SOURCE_DIR}/routeControl.cpp
HEADERS
${COMPONENT_SOURCE_DIR}/routeControl.h
INCDIRS
${COMPONENT_SOURCE_DIR}
${COMMON_SOURCE_DIR}
LIBRARIES
Qt5::Core
Qt5::Test
)
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
set(COMPONENT_TEST_NAME Algorithm_Switch_Tests)
set(COMPONENT_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/components/Algorithm_Switch)
set(COMMONPCM_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/common/pcm)
add_openpass_target(
NAME ${COMPONENT_TEST_NAME} TYPE test COMPONENT module
DEFAULT_MAIN
SOURCES
tst_ut_switch.cpp
${COMPONENT_SOURCE_DIR}/switch.cpp
HEADERS
tst_ut_switch.h
${COMPONENT_SOURCE_DIR}/switch.h
INCDIRS
${COMPONENT_SOURCE_DIR}
${COMMONPCM_SOURCE_DIR}
LIBRARIES
Qt5::Core
Qt5::Test
)
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
set(COMPONENT_TEST_NAME Dynamics_Chassis_Tests)
set(COMPONENT_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/components/Dynamics_Chassis)
add_openpass_target(
NAME ${COMPONENT_TEST_NAME} TYPE test COMPONENT module
SOURCES
tst_ut_Chassis3D.cpp
${COMPONENT_SOURCE_DIR}/ForceWheelZ.cpp
${COMPONENT_SOURCE_DIR}/WheelOscillation.cpp
HEADERS
${COMPONENT_SOURCE_DIR}/VehicleBasics.h
${COMPONENT_SOURCE_DIR}/ForceWheelZ.h
${COMPONENT_SOURCE_DIR}/WheelOscillation.h
INCDIRS
${COMPONENT_SOURCE_DIR}
LIBRARIES
Qt5::Core
Qt5::Test
)
......@@ -10,7 +10,6 @@
#include <QString>
#include <QtTest>
#include <qDebug>
#include "ForceWheelZ.h"
#include "VehicleBasics.h"
......
################################################################################
# Copyright (c) 2020-2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
add_subdirectory(UT_Dynamics2TM)
add_subdirectory(UT_Dynamics2TM_tire)
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
set(COMPONENT_TEST_NAME Dynamics_TwoTrack_Tests)
set(COMPONENT_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/components/Dynamics_TwoTrack/src)
set(COMMON_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/common)
add_openpass_target(
NAME ${COMPONENT_TEST_NAME} TYPE test COMPONENT module
SOURCES
tst_ut_dynamics2tmtest.cpp
${COMPONENT_SOURCE_DIR}/dynamics_twotrack_tire.cpp
${COMPONENT_SOURCE_DIR}/dynamics_twotrack_vehicle.cpp
HEADERS
${COMPONENT_SOURCE_DIR}/dynamics_twotrack_tire.h
${COMPONENT_SOURCE_DIR}/dynamics_twotrack_vehicle.h
INCDIRS
${COMPONENT_SOURCE_DIR}
${COMMON_SOURCE_DIR}
LIBRARIES
Qt5::Core
Qt5::Test
)
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
set(COMPONENT_TEST_NAME Dynamics_TwoTrackTire_Tests)
set(COMPONENT_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/components/Dynamics_TwoTrack/src)
set(COMMON_SOURCE_DIR ${OPENPASS_SIMCORE_DIR}/common)
add_openpass_target(
NAME ${COMPONENT_TEST_NAME} TYPE test COMPONENT module
SOURCES
tst_ut_dynamics2tmtest.cpp
${COMPONENT_SOURCE_DIR}/dynamics_twotrack_tire.cpp
HEADERS
${COMPONENT_SOURCE_DIR}/dynamics_twotrack_tire.h
INCDIRS
${COMPONENT_SOURCE_DIR}
${COMMON_SOURCE_DIR}
LIBRARIES
Qt5::Core
Qt5::Test
)
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
1. Install MSYS2 64-bit to C:/msys64 (default)
https://www.msys2.org/
https://www.msys2.org/
2. Open MSYS2 Shell and execute the following commands. Reply with "yes" or "return" if necessary.
- $ yes | pacman -Syu (repeat until no additional packages where installed)
- navigate with "cd" to script folder
- $ sh 10_prepare_msys2.sh
- $ yes | pacman -Syu (repeat until no additional packages where installed)
- navigate with "cd" to script folder
- $ sh 10_prepare_msys2.sh
3. Open MSYS2 MINGW64 Shell and execute the following commands. Reply with "yes" or "return" if necessary.
- $ sh 15_prepare_mingw.sh
- $ sh 15_prepare_mingw.sh
4. Configure Conan and build openpass with the following command
- $ sh 20_build.sh
- $ sh 20_build.sh
5. Add to your PATH environment variables:
- "c:\msys64\mingw64\bin"
- "c:\msys64\mingw64\lib"
- "c:\msys64\usr\bin"
5. Add "c:\msys64\mingw64\bin" (your Msys2 Installation path) to your PATH enviromnent variables.
\ No newline at end of file
6. Add new environment variables:
- CC = "c:/msys64/mingw64/bin/gcc.exe"
- CXX = "c:/msys64/mingw64/bin/g++.exe"
......@@ -14,18 +14,39 @@
# This script prepares the MSYS2 environment
################################################################################
yes | pacman -S mingw-w64-x86_64-cmake \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-gdb \
mingw-w64-x86_64-make \
mingw-w64-x86_64-qt5 git \
mingw-w64-x86_64-boost \
mingw-w64-x86_64-protobuf \
mingw-w64-x86_64-gtest \
mingw-w64-x86_64-ccache \
mingw-w64-x86_64-doxygen \
mingw-w64-x86_64-graphviz \
mingw-w64-x86_64-python-pip \
mingw-w64-x86_64-python-sphinx \
mingw-w64-x86_64-enchant
## manual installation of compatible versions from https://repo.msys2.org/mingw/mingw64/
# none
## automatic installation of latest versions
yes | pacman -S mingw-w64-x86_64-gcc
yes | pacman -S mingw-w64-x86_64-gdb
yes | pacman -S mingw-w64-x86_64-cmake
yes | pacman -S mingw-w64-x86_64-doxygen
yes | pacman -S mingw-w64-x86_64-qt5
yes | pacman -S mingw-w64-x86_64-qt5-debug
yes | pacman -S mingw-w64-x86_64-make
yes | pacman -S mingw-w64-x86_64-boost
yes | pacman -S mingw-w64-x86_64-protobuf
yes | pacman -S mingw-w64-x86_64-gtest
yes | pacman -S mingw-w64-x86_64-ccache
yes | pacman -S mingw-w64-x86_64-graphviz
yes | pacman -S mingw-w64-x86_64-python
yes | pacman -S mingw-w64-x86_64-python-pip
yes | pacman -S mingw-w64-x86_64-python-sphinx
yes | pacman -S git
## optional
# yes | pacman -S dos2unix
# yes | pacman -S make
# yes | pacman -S diffutils
# yes | pacman -S patch
# yes | pacman -S mingw-w64-x86_64-ag
# yes | pacman -S zlib-devel
# yes | pacman -S mingw-w64-x86_64-enchant
## list results
pacman -Qe
......@@ -14,8 +14,7 @@
# This script prepares the Mingw64 environment
################################################################################
yes | pip install conan --ignore-installed six \
sphinx-rtd-theme \
sphinx-tabs \
sphinxcontrib-spelling
yes | pip install conan --ignore-installed six
yes | pip install sphinx-rtd-theme
yes | pip install sphinx-tabs
yes | pip install sphinxcontrib-spelling
......@@ -3,9 +3,9 @@
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
......@@ -16,16 +16,17 @@
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
#conan profile update env.CC=c:/msys64/mingw64/bin/gcc.exe default
#conan profile update env.CXX=c:/msys64/mingw64/bin/g++.exe default
conan remote disable "conancenter"
conan remote disable "conan-center"
conan export ../recipe/osi
conan export ../recipe/fmi
conan export ../recipe/osi
conan export ../recipe/fmi
conan export ../recipe/openpass
mkdir ../install_file/openpass/build
mkdir ../install_file/openpass/build
cd ../install_file/openpass/build
conan install ../conanfile_windows.txt --build=missing
#!/bin/bash
################################################################################
# Copyright (c) 2021 ITK Engineering GmbH
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# SPDX-License-Identifier: EPL-2.0
################################################################################
################################################################################
# This script prepares the MSYS2 environment
################################################################################
## manual installation of compatible versions from https://repo.msys2.org/mingw/mingw64/
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-libs-10.2.0-6-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gcc-10.2.0-6-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-gdb-10.1-2-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-cmake-3.19.2-1-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-doxygen-1.8.20-1-any.pkg.tar.zst
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-qt5-5.15.2-5-any.pkg.tar.zst # yes | pacman -S mingw-w64-x86_64-qt5
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-qt5-debug-5.15.2-5-any.pkg.tar.zst # yes | pacman -S mingw-w64-x86_64-qt5-debug
yes | pacman -U mingw-w64-x86_64-gcc-libs-10.2.0-6-any.pkg.tar.zst # yes | pacman -S mingw-w64-x86_64-gcc
yes | pacman -U mingw-w64-x86_64-gcc-10.2.0-6-any.pkg.tar.zst # yes | pacman -S mingw-w64-x86_64-gcc
yes | pacman -U mingw-w64-x86_64-gdb-10.1-2-any.pkg.tar.zst # yes | pacman -S mingw-w64-x86_64-gdb
yes | pacman -U mingw-w64-x86_64-cmake-3.19.2-1-any.pkg.tar.zst # yes | pacman -S mingw-w64-x86_64-cmake
yes | pacman -U mingw-w64-x86_64-doxygen-1.8.20-1-any.pkg.tar.zst # yes | pacman -S mingw-w64-x86_64-doxygen
yes | pacman -U mingw-w64-x86_64-qt5-5.15.2-5-any.pkg.tar.zst
yes | pacman -U mingw-w64-x86_64-qt5-debug-5.15.2-5-any.pkg.tar.zst
# rm mingw-w64-x86_64-gcc-libs-10.2.0-6-any.pkg.tar.zst
# rm mingw-w64-x86_64-gcc-10.2.0-6-any.pkg.tar.zst
# rm mingw-w64-x86_64-gdb-10.1-2-any.pkg.tar.zst
# rm mingw-w64-x86_64-cmake-3.19.2-1-any.pkg.tar.zst
# rm mingw-w64-x86_64-doxygen-1.8.20-1-any.pkg.tar.zst
# rm mingw-w64-x86_64-qt5-5.15.2-5-any.pkg.tar.zst
# rm mingw-w64-x86_64-qt5-debug-5.15.2-5-any.pkg.tar.zst
## automatic installation of latest versions
yes | pacman -S mingw-w64-x86_64-make
yes | pacman -S mingw-w64-x86_64-boost
yes | pacman -S mingw-w64-x86_64-protobuf
yes | pacman -S mingw-w64-x86_64-gtest
yes | pacman -S mingw-w64-x86_64-ccache
yes | pacman -S mingw-w64-x86_64-graphviz
yes | pacman -S mingw-w64-x86_64-python
yes | pacman -S mingw-w64-x86_64-python-pip
yes | pacman -S mingw-w64-x86_64-python-sphinx
yes | pacman -S git
## optional
# yes | pacman -S dos2unix
# yes | pacman -S make
# yes | pacman -S diffutils
# yes | pacman -S patch
# yes | pacman -S mingw-w64-x86_64-ag
# yes | pacman -S zlib-devel
# yes | pacman -S mingw-w64-x86_64-enchant
## list results
pacman -Qe
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment