summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2025-03-08 15:00:41 +0000
committerCoprDistGit <infra@openeuler.org>2025-03-08 15:00:41 +0000
commit7bd1420533a3a2fa1fad69f45ec4568cedb45ddd (patch)
tree261016b4c918289cfdac50b0eb72e08a7090ffb8
parent10bf930dda6b68321423cc22531ae1630d10b93f (diff)
automatic import of ros-humble-performance-testopeneuler24.03_LTS
-rw-r--r--.gitignore5
-rw-r--r--0-performance-test-change-cmake-download.patch48
-rw-r--r--performance-test.spec116
-rw-r--r--sources5
4 files changed, 174 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..95d5b26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/rapidjson-v1.1.0.tar.gz
+/ros-humble-performance-test_1.2.1.orig.tar.gz
+/sole-1.0.2.tar.gz
+/tabulate-v1.4.tar.gz
+/tclap-1.4.0-rc1.tar.gz
diff --git a/0-performance-test-change-cmake-download.patch b/0-performance-test-change-cmake-download.patch
new file mode 100644
index 0000000..f24f998
--- /dev/null
+++ b/0-performance-test-change-cmake-download.patch
@@ -0,0 +1,48 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index a31964b..73394bb 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -323,9 +323,7 @@ include(ExternalProject)
+ set(EXTERNAL_INSTALL_LOCATION ${CMAKE_BINARY_DIR}/external)
+ externalproject_add(
+ tclap
+- GIT_REPOSITORY http://git.code.sf.net/p/tclap/code
+- GIT_TAG 1.4.0-rc1
+- GIT_SHALLOW TRUE
++ URL ${CMAKE_SOURCE_DIR}/tclap-1.4.0-rc1.tar.gz
+ PREFIX ${EXTERNAL_INSTALL_LOCATION}
+ SOURCE_DIR ${EXTERNAL_INSTALL_LOCATION}/tclap
+ CMAKE_COMMAND ""
+@@ -338,9 +336,7 @@ include_directories(SYSTEM ${EXTERNAL_INSTALL_LOCATION}/tclap/include)
+
+ externalproject_add(
+ rapidjson
+- GIT_REPOSITORY https://github.com/Tencent/rapidjson.git
+- GIT_TAG v1.1.0
+- GIT_SHALLOW TRUE
++ URL ${CMAKE_SOURCE_DIR}/rapidjson-v1.1.0.tar.gz
+ PREFIX ${EXTERNAL_INSTALL_LOCATION}
+ SOURCE_DIR ${EXTERNAL_INSTALL_LOCATION}/rapidjson
+ CMAKE_COMMAND ""
+@@ -357,9 +353,7 @@ include_directories(SYSTEM ${EXTERNAL_INSTALL_LOCATION}/rapidjson/include)
+
+ externalproject_add(
+ tabulate
+- GIT_REPOSITORY https://github.com/p-ranav/tabulate.git
+- GIT_TAG v1.4
+- GIT_SHALLOW TRUE
++ URL ${CMAKE_SOURCE_DIR}/tabulate-v1.4.tar.gz
+ PREFIX ${EXTERNAL_INSTALL_LOCATION}
+ SOURCE_DIR ${EXTERNAL_INSTALL_LOCATION}/tabulate
+ PATCH_COMMAND sed -i "39d" "${EXTERNAL_INSTALL_LOCATION}/tabulate/include/tabulate/column.hpp"
+@@ -379,9 +373,7 @@ include_directories(SYSTEM ${EXTERNAL_INSTALL_LOCATION}/tabulate/include)
+
+ externalproject_add(
+ sole
+- GIT_REPOSITORY https://github.com/r-lyeh-archived/sole.git
+- GIT_TAG 1.0.2
+- GIT_SHALLOW TRUE
++ URL ${CMAKE_SOURCE_DIR}/sole-1.0.2.tar.gz
+ PREFIX ${EXTERNAL_INSTALL_LOCATION}
+ SOURCE_DIR ${EXTERNAL_INSTALL_LOCATION}/sole
+ PATCH_COMMAND patch
diff --git a/performance-test.spec b/performance-test.spec
new file mode 100644
index 0000000..600d19f
--- /dev/null
+++ b/performance-test.spec
@@ -0,0 +1,116 @@
+%bcond_without tests
+%bcond_without weak_deps
+
+%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
+%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$
+%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$
+
+%define RosPkgName performance-test
+%define ros_distro humble
+
+Name: ros-%{ros_distro}-%{RosPkgName}
+Version: 1.2.1
+Release: 1%{?dist}%{?release_suffix}
+Summary: Tool to test performance of ROS2 and DDS data layers and communication.
+
+License: Apache 2.0
+Source0: %{name}_%{version}.orig.tar.gz
+Source1: tclap-1.4.0-rc1.tar.gz
+Source2: rapidjson-v1.1.0.tar.gz
+Source3: tabulate-v1.4.tar.gz
+Source4: sole-1.0.2.tar.gz
+
+Patch0: 0-performance-test-change-cmake-download.patch
+
+Requires: ros-%{ros_distro}-rclcpp
+Requires: ros-%{ros_distro}-rmw-implementation
+Requires: ros-%{ros_distro}-rosidl-default-runtime
+Requires: ros-%{ros_distro}-ros-workspace
+
+BuildRequires: ros-%{ros_distro}-osrf-testing-tools-cpp
+BuildRequires: ros-%{ros_distro}-rclcpp
+BuildRequires: ros-%{ros_distro}-ament-cmake
+BuildRequires: ros-%{ros_distro}-rosidl-default-generators
+BuildRequires: ros-%{ros_distro}-ros-workspace
+
+%if 0%{?with_tests}
+BuildRequires: ros-%{ros_distro}-ament-cmake-gtest
+BuildRequires: ros-%{ros_distro}-ament-lint-auto
+BuildRequires: ros-%{ros_distro}-ament-lint-common
+BuildRequires: ros-%{ros_distro}-launch
+BuildRequires: ros-%{ros_distro}-launch-testing
+BuildRequires: ros-%{ros_distro}-rmw-implementation-cmake
+BuildRequires: ros-%{ros_distro}-osrf-testing-tools-cpp
+%endif
+
+Provides: %{name}-devel = %{version}-%{release}
+Provides: %{name}-doc = %{version}-%{release}
+Provides: %{name}-runtime = %{version}-%{release}
+
+%description
+Tool to test performance of ROS2 and DDS data layers and communication.
+
+%prep
+%autosetup -p1
+cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
+
+%build
+# Needed to bootstrap since the ros_workspace package does not yet exist.
+export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages
+
+# In case we're installing to a non-standard location, look for a setup.sh
+# in the install tree and source it. It will set things like
+# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
+if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi
+mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform}
+export ROS_DISTRO=%{ros_distro}
+%cmake3 \
+ -UINCLUDE_INSTALL_DIR \
+ -ULIB_INSTALL_DIR \
+ -USYSCONF_INSTALL_DIR \
+ -USHARE_INSTALL_PREFIX \
+ -ULIB_SUFFIX \
+ -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \
+ -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \
+ -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \
+ -DSETUPTOOLS_DEB_LAYOUT=OFF \
+%if !0%{?with_tests}
+ -DBUILD_TESTING=OFF \
+%endif
+ ..
+
+%make_build
+
+%install
+# Needed to bootstrap since the ros_workspace package does not yet exist.
+export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages
+
+# In case we're installing to a non-standard location, look for a setup.sh
+# in the install tree and source it. It will set things like
+# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
+if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi
+%make_install -C .obj-%{_target_platform}
+
+%if 0%{?with_tests}
+%check
+# Needed to bootstrap since the ros_workspace package does not yet exist.
+export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages
+
+# Look for a Makefile target with a name indicating that it runs tests
+TEST_TARGET=$(%__make -qp -C .obj-%{_target_platform} | sed "s/^\(test\|check\):.*/\\1/;t f;d;:f;q0")
+if [ -n "$TEST_TARGET" ]; then
+# In case we're installing to a non-standard location, look for a setup.sh
+# in the install tree and source it. It will set things like
+# CMAKE_PREFIX_PATH, PKG_CONFIG_PATH, and PYTHONPATH.
+if [ -f "/opt/ros/%{ros_distro}/setup.sh" ]; then . "/opt/ros/%{ros_distro}/setup.sh"; fi
+CTEST_OUTPUT_ON_FAILURE=1 \
+ %make_build -C .obj-%{_target_platform} $TEST_TARGET || echo "RPM TESTS FAILED"
+else echo "RPM TESTS SKIPPED"; fi
+%endif
+
+%files
+/opt/ros/%{ros_distro}
+
+%changelog
+* Thu May 04 2023 Apex AI, Inc. opensource@apex.ai - 1.2.1-1
+- Autogenerated by ros-porting-tools
diff --git a/sources b/sources
new file mode 100644
index 0000000..451d755
--- /dev/null
+++ b/sources
@@ -0,0 +1,5 @@
+38ff6eb07e64f78fc8ae472c75f0805d rapidjson-v1.1.0.tar.gz
+4cdc486ba13984792f74f8ec3ba88ef5 ros-humble-performance-test_1.2.1.orig.tar.gz
+4894d6abcc8d5142b87ec5bbef1527a6 sole-1.0.2.tar.gz
+5cf011a325f4bee8e5f107e0820e9da5 tabulate-v1.4.tar.gz
+27fbd047266a6593ddb5533ea7eaad87 tclap-1.4.0-rc1.tar.gz