Skip to content

Commit

Permalink
added mockup test fo prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
mathias-luedtke committed Mar 16, 2017
1 parent 3e4ed17 commit a796590
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ env:
- ROS_DISTRO=indigo CATKIN_PARALLEL_JOBS='-p1' ROS_PARALLEL_JOBS='-j1' # Intend build on low-power platform
# - env: ROS_DISTRO=indigo PRERELEASE=true ## Comment out because this is meaningless for always failing without prerelease testable contents in industrial_ci.
- ROS_DISTRO=indigo PRERELEASE=true PRERELEASE_DOWNSTREAM_DEPTH=1
- ROS_DISTRO=indigo PRERELEASE=true USE_MOCKUP='industrial_ci/mockups/failing_test' EXPECT_EXIT_CODE=1
- ROS_DISTRO=kinetic PRERELEASE=true PRERELEASE_REPONAME=industrial_ci
- ROS_DISTRO=indigo APTKEY_STORE_SKS=hkp://ha.pool.sks-keyservers.vet # Passing wrong SKS URL as a break test. Should still pass.
- ROS_DISTRO=indigo UPSTREAM_WORKSPACE=debian
Expand Down
13 changes: 13 additions & 0 deletions industrial_ci/mockups/failing_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 2.8.3)
project(failing_test)

find_package(catkin REQUIRED)

catkin_package()

if (CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
add_rostest(test/no_talker.test)
endif()

install(DIRECTORY test DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
13 changes: 13 additions & 0 deletions industrial_ci/mockups/failing_test/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<package format="2">
<name>failing_test</name>
<version>0.3.1</version>
<description>packages with a failing test</description>

<maintainer email="130s@2000.jukuin.keio.ac.jp">Isaac I. Y. Saito</maintainer>
<author email="130s@2000.jukuin.keio.ac.jp">Isaac I. Y. Saito</author>
<license>Apache License 2.0</license>

<buildtool_depend>catkin</buildtool_depend>
<test_depend>rostest</test_depend>
</package>
11 changes: 11 additions & 0 deletions industrial_ci/mockups/failing_test/test/no_talker.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<launch>
<!-- This launch file is used to test the rostest on CI server works. It can be any ROS tests that are generic enough -->

<param name="hztest1/topic" value="chatter" />
<param name="hztest1/hz" value="10.0" />
<param name="hztest1/hzerror" value="0.5" />
<param name="hztest1/test_duration" value="1.0" />
<param name="hztest1/wait_time" value="1.0" />
<test test-name="hztest_test" pkg="rostest" type="hztest"
name="hztest1" />
</launch>
7 changes: 7 additions & 0 deletions industrial_ci/src/tests/ros_prerelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ function run_ros_prerelease() {
local reponame=${PRERELEASE_REPONAME:-$TARGET_REPO_NAME}
cp -a "$TARGET_REPO_PATH" "$WORKSPACE/catkin_workspace/src/$reponame"

if [ "${USE_MOCKUP// }" != "" ]; then
if [ ! -d "$TARGET_REPO_PATH/$USE_MOCKUP" ]; then
error "mockup directory '$USE_MOCKUP' does not exist"
fi
cp -a "$TARGET_REPO_PATH/$USE_MOCKUP" "$WORKSPACE/catkin_workspace/src"
fi

run_in_prerelease_docker generate_prerelease_script.py https://raw.githubusercontent.com/ros-infrastructure/ros_buildfarm_config/production/index.yaml "$ROS_DISTRO" default ubuntu "$UBUNTU_OS_CODE_NAME" amd64 --level "$downstream_depth" --output-dir . --custom-repo "$reponame::::"
ici_time_end # setup_prerelease_scripts

Expand Down

0 comments on commit a796590

Please sign in to comment.