Skip to content

Commit ecf3069

Browse files
committed
vendor: Add esmini/2.37.4
1 parent bdf616f commit ecf3069

12 files changed

+684
-6
lines changed

Makefile.setup

+5-1
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,18 @@ install-ubuntu-deps::
114114
git \
115115
graphviz \
116116
jq \
117+
libgl-dev \
118+
libxinerama-dev \
119+
libxrandr-dev \
120+
libfontconfig1-dev \
117121
netcat-openbsd \
118122
patchelf \
119123
psmisc \
120124
python3-pip \
121125
python3-setuptools \
126+
python3-venv \
122127
time \
123128
tmux \
124-
python3-venv \
125129
;
126130

127131
# Require GCC and G++ version >= 8

plugins/esmini/conanfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def set_version(self):
2828

2929
def requirements(self):
3030
self.requires("eigen/3.4.0")
31-
self.requires(f"esmini/2.37.0@cloe/stable")
31+
self.requires(f"esmini/2.37.4@cloe/stable")
3232
self.requires(f"cloe-runtime/{self.version}@cloe/develop")
3333
self.requires(f"cloe-models/{self.version}@cloe/develop")
3434
self.requires(f"cloe-osi/{self.version}@cloe/develop")

plugins/esmini/tests/conanfile_esmini.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def requirements(self):
3333
self.requires(f"cloe-plugin-gndtruth-extractor/{self.version}@cloe/develop")
3434
self.requires(f"cloe-plugin-virtue/{self.version}@cloe/develop")
3535
self.requires(f"cloe-plugin-esmini/{self.version}@cloe/develop")
36-
self.requires("esmini-data/2.37.0@cloe/stable")
36+
self.requires("esmini-data/2.37.4@cloe/stable")
3737

3838
# Overrides:
3939
self.requires("zlib/1.2.13", override=True)

vendor/esmini-data/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ override SOURCE_DIR := src
33
override PACKAGE_CHANNEL := cloe/stable
44
override CLEAN_SOURCE_DIR := true
55

6+
# There are many versions that can be generated from this recipe,
7+
# the current one that we want is defined here.
8+
override PACKAGE_VERSION := 2.37.4
9+
610
PROJECT_ROOT := ../..
711
include ${PROJECT_ROOT}/Makefile.package

vendor/esmini-data/conandata.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
---
22
sources:
3+
2.37.4:
4+
url:
5+
- https://github.com/esmini/esmini/archive/refs/tags/v2.37.4.tar.gz
6+
sha256: "6d765db38bc3769a867555f108c25b0d62029780d41784e429822ed35776bfc6"
37
2.37.0:
48
url:
59
- https://github.com/esmini/esmini/archive/refs/tags/v2.37.0.tar.gz
610
sha256: "a1f216411caa7d8782dd9c82683f8bac3f00d7da2f6370535726b6446c339e59"
711
patches:
8-
2.37.0:
12+
2.37.x: &esmini-2_37_x-patches
913
- patch_file: patches/2.37.0-test-driver-path.patch
1014
patch_type: git
1115
patch_description: >
1216
Patch paths to reflect new position of test-driver.xosc.
17+
2.37.4: *esmini-2_37_x-patches
18+
2.37.0: *esmini-2_37_x-patches

vendor/esmini-data/conanfile.py

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
class ESMiniData(ConanFile):
1010
name = "esmini-data"
11-
version = "2.37.0"
1211
license = "MPL-2.0"
1312
url = "https://github.com/esmini/esmini"
1413
description = "Basic OpenScenario player example data"

vendor/esmini/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ override SOURCE_DIR := src
33
override PACKAGE_CHANNEL := cloe/stable
44
override CLEAN_SOURCE_DIR := true
55

6+
# There are many versions that can be generated from this recipe,
7+
# the current one that we want is defined here.
8+
override PACKAGE_VERSION := 2.37.4
9+
610
PROJECT_ROOT := ../..
711
include ${PROJECT_ROOT}/Makefile.package

vendor/esmini/conandata.yml

+23
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
---
22
sources:
3+
2.37.4:
4+
url:
5+
- https://github.com/esmini/esmini/archive/refs/tags/v2.37.4.tar.gz
6+
sha256: "6d765db38bc3769a867555f108c25b0d62029780d41784e429822ed35776bfc6"
37
2.37.0:
48
url:
59
- https://github.com/esmini/esmini/archive/refs/tags/v2.37.0.tar.gz
610
sha256: "a1f216411caa7d8782dd9c82683f8bac3f00d7da2f6370535726b6446c339e59"
711
patches:
12+
2.37.4:
13+
- patch_file: patches/2.37.4_add_ctest.patch
14+
patch_type: git
15+
patch_description: >
16+
Use CTest for running all unit tests.
17+
- patch_file: patches/2.37.0_remove_operating_system_test.patch
18+
patch_type: git
19+
patch_description: >
20+
Remove unnecessary operating system test. This intentionally fails and requires
21+
a gtest filter to be used, but it's easier to just remove it.
22+
- patch_file: patches/2.37.4_use_conan_osi_package.patch
23+
patch_type: git
24+
patch_description: >
25+
Use open_simulation_interface package from Conan instead of downloaded version.
26+
- patch_file: patches/2.37.4_disable_unittests_for_container.patch
27+
patch_type: git
28+
patch_description: >
29+
Disable unit tests that only fail when we run within a container.
30+
Presumably these unit tests require a running desktop environment.
831
2.37.0:
932
- patch_file: patches/2.37.0_add_ctest.patch
1033
patch_type: git

vendor/esmini/conanfile.py

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
class ESMini(ConanFile):
1111
name = "esmini"
12-
version = "2.37.0"
1312
license = "MPL-2.0"
1413
url = "https://github.com/esmini/esmini"
1514
description = "Basic OpenScenario player"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index aec4cf5..46089bf 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -1,18 +1,9 @@
6+
+cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
7+
+
8+
message(
9+
STATUS "CMake version: "
10+
${CMAKE_VERSION})
11+
12+
-if(WIN32)
13+
- cmake_minimum_required(
14+
- VERSION 3.7.1 # for cmake generator VisualStudio 2017 support
15+
- # VERSION 3.14 # for cmake generator VisualStudio 2019 support VERSION 3.19 # for cmake presets support
16+
- FATAL_ERROR)
17+
-else()
18+
- cmake_minimum_required(
19+
- VERSION 2.8.12
20+
- FATAL_ERROR)
21+
-endif()
22+
-
23+
# ############################# Project generate options ###########################################################
24+
25+
project(
26+
@@ -98,6 +89,8 @@ set_property(
27+
PROPERTY USE_FOLDERS
28+
ON)
29+
30+
+include(CTest)
31+
+
32+
include(support/cmake/rule/project_options.cmake)
33+
34+
if(${CMAKE_SYSTEM_NAME}
35+
diff --git a/support/cmake/common/unittest.cmake b/support/cmake/common/unittest.cmake
36+
index 2df5b8a..edb9efe 100644
37+
--- a/support/cmake/common/unittest.cmake
38+
+++ b/support/cmake/common/unittest.cmake
39+
@@ -2,6 +2,9 @@ include_guard()
40+
41+
# ############################### Building given unittest target ###################################################
42+
43+
+include(CTest)
44+
+include(GoogleTest)
45+
+
46+
macro(
47+
unittest
48+
TARGET
49+
@@ -55,5 +58,6 @@ macro(
50+
add_test(
51+
NAME ${TARGET}
52+
COMMAND ${TARGET})
53+
+ gtest_add_tests(TARGET ${TARGET})
54+
55+
endmacro()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
diff --git a/EnvironmentSimulator/Unittest/CMakeLists.txt b/EnvironmentSimulator/Unittest/CMakeLists.txt
2+
index f9764c9..866c63a 100644
3+
--- a/EnvironmentSimulator/Unittest/CMakeLists.txt
4+
+++ b/EnvironmentSimulator/Unittest/CMakeLists.txt
5+
@@ -38,19 +38,20 @@ unittest(
6+
7+
# ############################### Creating executable (ScenarioPlayer_test) ##########################################
8+
9+
-unittest(
10+
- ScenarioPlayer_test
11+
- ScenarioPlayer_test.cpp
12+
- PlayerBase
13+
- ScenarioEngine
14+
- Controllers
15+
- RoadManager
16+
- CommonMini
17+
- ${VIEWER_LIBS_FOR_TEST}
18+
- ${OSG_LIBRARIES}
19+
- ${OSI_LIBRARIES}
20+
- ${SUMO_LIBRARIES}
21+
- ${SOCK_LIB})
22+
+# DISABLED: Fails in container.
23+
+# unittest(
24+
+# ScenarioPlayer_test
25+
+# ScenarioPlayer_test.cpp
26+
+# PlayerBase
27+
+# ScenarioEngine
28+
+# Controllers
29+
+# RoadManager
30+
+# CommonMini
31+
+# ${VIEWER_LIBS_FOR_TEST}
32+
+# ${OSG_LIBRARIES}
33+
+# ${OSI_LIBRARIES}
34+
+# ${SUMO_LIBRARIES}
35+
+# ${SOCK_LIB})
36+
37+
# ############################### Creating executable (ScenarioEngineDll_test) #######################################
38+
39+
@@ -58,12 +59,13 @@ set(ScenarioEngineDll_sources
40+
ScenarioEngineDll_test.cpp
41+
"${REPLAYER_PATH}/Replay.cpp")
42+
43+
-unittest(
44+
- ScenarioEngineDll_test
45+
- "${ScenarioEngineDll_sources}"
46+
- esminiLib
47+
- CommonMini
48+
- ${OSI_LIBRARIES})
49+
+# DISABLED: Fails in container.
50+
+# unittest(
51+
+# ScenarioEngineDll_test
52+
+# "${ScenarioEngineDll_sources}"
53+
+# esminiLib
54+
+# CommonMini
55+
+# ${OSI_LIBRARIES})
56+
57+
# ############################### Creating executable (RoadManagerDll_test) ##########################################
58+
59+
diff --git a/EnvironmentSimulator/Unittest/ScenarioEngineDll_test.cpp b/EnvironmentSimulator/Unittest/ScenarioEngineDll_test.cpp
60+
index 65a0e52..24523f8 100644
61+
--- a/EnvironmentSimulator/Unittest/ScenarioEngineDll_test.cpp
62+
+++ b/EnvironmentSimulator/Unittest/ScenarioEngineDll_test.cpp
63+
@@ -3585,7 +3585,7 @@ static bool CheckFileExists(std::string filename, long long timestamp)
64+
return false;
65+
}
66+
67+
-TEST(APITest, TestFetchImage)
68+
+TEST(APITest, DIABLED_TestFetchImage)
69+
{
70+
struct stat fileStatus;
71+
long long oldModTime = 0;
72+
diff --git a/EnvironmentSimulator/Unittest/ScenarioPlayer_test.cpp b/EnvironmentSimulator/Unittest/ScenarioPlayer_test.cpp
73+
index 4d9a6d2..e21c4e8 100644
74+
--- a/EnvironmentSimulator/Unittest/ScenarioPlayer_test.cpp
75+
+++ b/EnvironmentSimulator/Unittest/ScenarioPlayer_test.cpp
76+
@@ -11,7 +11,7 @@ using namespace scenarioengine;
77+
78+
#ifdef _USE_OSG
79+
80+
-TEST(CustomCameraTest, TestCustomCameraVariants)
81+
+TEST(CustomCameraTest, DISABLED_TestCustomCameraVariants)
82+
{
83+
const char* args[] =
84+
{"esmini", "--osc", "../../../resources/xosc/cut-in_cr.xosc", "--window", "60", "60", "800", "600", "--headless", "--disable_stdout"};
85+
@@ -368,11 +368,6 @@ TEST(Controllers, TestSeparateControllersOnLatLong)
86+
const char* args[] = {"esmini",
87+
"--osc",
88+
"../../../EnvironmentSimulator/Unittest/xosc/acc_with_interactive_steering.xosc",
89+
- "--window",
90+
- "60",
91+
- "60",
92+
- "800",
93+
- "600",
94+
"--headless",
95+
"--disable_stdout"};
96+
int argc = sizeof(args) / sizeof(char*);

0 commit comments

Comments
 (0)