Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
asherikov committed Jan 3, 2025
1 parent 5819d23 commit 2b5878a
Show file tree
Hide file tree
Showing 12 changed files with 502 additions and 73 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ws_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@ jobs:
- uses: actions/checkout@v4
with:
path: src/ariles_ws
- run: cd src/ariles_ws/demo/plain/ && mv package.xml.disable package.xml
- run: make bp_install_build BUILD_PROFILE=reldebug
- run: make dep_install PKG=ariles2_plain_demo
- run: make ariles2_plain_demo
- run: make dep_install PKG=ariles2_ros2param_ws
- run: make ariles2_ros2param_ws

noble_ccws:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
repository: asherikov/ccws
- uses: actions/checkout@v4
with:
path: src/ariles_ws
- run: cd src/ariles_ws/demo/plain/ && mv package.xml.disable package.xml
- run: make bp_install_build BUILD_PROFILE=reldebug
- run: make dep_install PKG=ariles2_plain_demo
- run: make ariles2_plain_demo
- run: make dep_install PKG=ariles2_ros2param_ws
- run: make ariles2_ros2param_ws
2 changes: 1 addition & 1 deletion .make/ariles.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ VERSION?="XXX__version_not_set__XXX"


REPO=https://github.com/asherikov/ariles.git
DEPENDENCY_PATH=./demo
DEPENDENCY_PATH=./demo/
DEBIAN_SYSTEM_DEPENDENCIES=libeigen3-dev octave libyaml-cpp-dev rapidjson-dev libpugixml-dev libboost-all-dev


Expand Down
11 changes: 5 additions & 6 deletions .make/ros.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WS_PKGS= \
ariles2_rosparam_ws \
ariles2_pugixml_ws

CATKIN_DEPENDENCY_TEST_PKG=ariles2_ws_demo
CATKIN_DEPENDENCY_TEST_PKG=ariles2_catkin_demo
CATKIN_ARGS=--cmake-args -DARILES_ROS_ENABLE_TESTS=ON
CATKIN_TARGETS=all test

Expand Down Expand Up @@ -76,7 +76,7 @@ catkin_test_deb: clean
echo ${WS_PKGS} | tr " " "\n" | xargs -I {} ${MAKE} catkin_test_deb_pkg PKG="{}" ROS_DISTRO=${ROS_DISTRO}
bash -c 'source /opt/ros/${ROS_DISTRO}/setup.bash; \
cd build/dependency_test; \
cmake ../../${DEPENDENCY_PATH}/; \
cmake ../../${DEPENDENCY_PATH}/plain_ros1; \
${MAKE} ${MAKE_FLAGS}'


Expand Down Expand Up @@ -105,7 +105,7 @@ catkin_old_deb: catkin_prepare_workspace
${MAKE} catkin_test_deb
${MAKE} catkin_prepare_workspace
cd ${CATKIN_PKGS_PATH}/; ls -1A | grep -v demo | xargs rm -Rf
cd ${CATKIN_PKGS_PATH}/demo; mv package.xml.disable package.xml
cd ${CATKIN_PKGS_PATH}/demo/catkin; mv package.xml.disable package.xml
cd ${CATKIN_WORKING_DIR}/src; catkin_init_workspace
cd ${CATKIN_WORKING_DIR}; catkin_make_isolated --pkg ${CATKIN_DEPENDENCY_TEST_PKG}
sudo ${MAKE} clean_deb clean_rosdep
Expand All @@ -116,15 +116,15 @@ catkin_new_build: catkin_prepare_workspace
cd ${CATKIN_WORKING_DIR}; catkin build -i --verbose --summary ${WS_PKGS} --make-args ${CATKIN_TARGETS} ${CATKIN_ARGS}

catkin_new_build_with_dependent: catkin_prepare_workspace
cd ${CATKIN_PKGS_PATH}/demo; mv package.xml.disable package.xml
cd ${CATKIN_PKGS_PATH}/demo/catkin; mv package.xml.disable package.xml
cd ${CATKIN_WORKING_DIR}; catkin init
cd ${CATKIN_WORKING_DIR}; catkin build -i --verbose --summary ${CATKIN_DEPENDENCY_TEST_PKG}

catkin_new_deb:
${MAKE} catkin_test_deb
${MAKE} catkin_prepare_workspace
cd ${CATKIN_PKGS_PATH}; ls -1A | grep -v demo | xargs rm -Rf
cd ${CATKIN_PKGS_PATH}/demo; mv package.xml.disable package.xml
cd ${CATKIN_PKGS_PATH}/demo/catkin; mv package.xml.disable package.xml
cd ${CATKIN_WORKING_DIR}; catkin init
cd ${CATKIN_WORKING_DIR}; catkin build -i --verbose --summary ${CATKIN_DEPENDENCY_TEST_PKG}
sudo ${MAKE} clean_deb
Expand Down Expand Up @@ -162,7 +162,6 @@ ros_prerelease: ros_prerelease_deps
cd ./build/ros_prerelease; sed -i "s|\(-e=TRAVIS\)|-eCCACHE_DIR=./.ccache/ \1|" *.sh
cd ./build/ros_prerelease; env ABORT_ON_TEST_FAILURE=1 CCACHE_DIR=`pwd`/.ccache ./prerelease.sh


# docker
#----------------------------------------------
ros_make_docker:
Expand Down
61 changes: 0 additions & 61 deletions demo/CMakeLists.txt

This file was deleted.

38 changes: 38 additions & 0 deletions demo/catkin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
cmake_minimum_required(VERSION 2.8.12)

set(CMAKE_VERBOSE_MAKEFILE ON)

project(ariles2_catkin_demo)

find_package(catkin REQUIRED
ariles2_core_ws
ariles2_rosparam_ws
ariles2_rapidjson_ws
ariles2_yamlcpp_ws
ariles2_octave_ws
ariles2_pugixml_ws
)

catkin_package(DEPENDS
ariles2_core_ws
ariles2_rosparam_ws
ariles2_rapidjson_ws
ariles2_yamlcpp_ws
ariles2_octave_ws
ariles2_pugixml_ws
)

include_directories(
include
SYSTEM ${catkin_INCLUDE_DIRS}
)

add_executable(demo demo.cpp)

target_link_libraries(demo ${catkin_LIBRARIES})

install(TARGETS demo
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
1 change: 0 additions & 1 deletion demo/demo.cpp → demo/catkin/demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ int main()
demo::MyContainerClass my_container_class;

// access members as usual
my_container_class.my_class_vector_.size();
my_container_class.my_class_vector_.push_back(demo::MyClass());
ariles2::apply<ariles2::Defaults>(my_container_class.my_class_vector_[0]);

Expand Down
5 changes: 1 addition & 4 deletions demo/package.xml.disable → demo/catkin/package.xml.disable
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<package format="2">
<name>ariles2_ws_demo</name>
<name>ariles2_catkin_demo</name>
<version>0.0.0</version>
<description>ariles2 demo / dependency test</description>

Expand All @@ -16,7 +16,4 @@
<depend>ariles2_yamlcpp_ws</depend>
<depend>ariles2_octave_ws</depend>
<depend>ariles2_pugixml_ws</depend>

<export>
</export>
</package>
22 changes: 22 additions & 0 deletions demo/plain/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 2.8.12)

set(CMAKE_VERBOSE_MAKEFILE ON)


project(ariles2_plain_demo)

find_package(ariles2-core REQUIRED)
find_package(ariles2-rapidjson REQUIRED)
find_package(ariles2-yaml-cpp REQUIRED)
find_package(ariles2-octave REQUIRED)
find_package(ariles2-pugixml REQUIRED)


add_executable(demo demo.cpp)
target_link_libraries(demo
ariles2::core
ariles2::rapidjson
ariles2::yaml-cpp
ariles2::octave
ariles2::pugixml
)
Loading

0 comments on commit 2b5878a

Please sign in to comment.