-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use latest prerelease features #145
Changes from 4 commits
6d8844c
34a6e61
a5a53cf
3a82d5e
dfe61cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,9 +166,7 @@ Note that some of these currently tied only to a single option, but we still lea | |
* `NOT_TEST_INSTALL` (default: not set): If true, tests in `install` space won't be run. | ||
* `PRERELEASE` (default: false): If `true`, run `Prerelease Test on docker that emulates ROS buildfarm <http://wiki.ros.org/bloom/Tutorials/PrereleaseTest/>`_. The usage of Prerelease Test feature is `explained more in this section <https://github.com/ros-industrial/industrial_ci/blob/add/dockerbased_prerelease/README.rst#optional-run-ros-prerelease-test>`_. | ||
* `PRERELEASE_DOWNSTREAM_DEPTH` (0 to 4, default: 0): Number of the levels of the package dependecies the Prerelease Test targets at. Range of the level is defined by ROS buildfarm (`<http://prerelease.ros.org>`_). NOTE: a job can run exponentially longer for the values greater than `0` depending on how many packages depend on your package (and remember a job on Travis CI can only run for up to 50 minutes). | ||
* `PRERELEASE_REPONAME` (default: not set): The target of Prerelease Test (that you select at `<http://prerelease.ros.org/indigo>`_, `<http://prerelease.ros.org/kinetic>`_ etc.). | ||
* If not set then it tests the package of the repository's name. You can specify this by your ROS package name format (with underscore e.g. `industrial_core`), not Debian package name format. NOTE that this package name must be listed in the `rosdistro/distribution.yaml` (e.g. [for ROS Indigo](https://github.com/ros/rosdistro/blob/master/indigo/distribution.yaml)) (this requirement comes from ROS buildfarm's Prerelease Test). | ||
* (As of Dec 2016) when this variable is set, development branch listed in `rosdistro/distribution.yaml` is tested. See [detail](https://github.com/ros-industrial/industrial_ci/pull/85#issue-196409011). | ||
* `PRERELEASE_REPONAME` (default: TARGET_REPO_NAME): The name of the target of Prerelease Test in rosdistro (that you select at `<http://prerelease.ros.org>`_). You can specify this if your repository name differs from the corresponding rosdisto entry. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is a bit unclear. Readers may want to know, in which cases specifying different name here could be useful, if the name specified is different from the tested repo name, where is the specified package retrieved from? etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does not get retrieved. It is just the name in rosdistro. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. That usecase is a good example. We should add it to the doc or at least link here. Please review mathias-luedtke#8 |
||
* `PKGS_DOWNSTREAM` (default: explained): Packages in downstream to be tested. By default, `TARGET_PKGS` is used if set, if not then `BUILD_PKGS` is used. | ||
* `ROS_PARALLEL_JOBS` (default: -j8): Maximum number of packages to be built in parallel by the underlining build tool. As of Jan 2016, this is only enabled with `catkin_tools` (with `make` as an underlining builder). | ||
* `ROS_PARALLEL_TEST_JOBS` (default: -j8): Maximum number of packages which could be examined in parallel during the test run by the underlining build tool. If not set it's filled by `ROS_PARALLEL_JOBS`. As of Jan 2016, this is only enabled with `catkin_tools` (with `make` as an underlining builder). | ||
|
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}) |
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> |
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> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,7 @@ EOF | |
function run_in_prerelease_docker() { | ||
ici_run_cmd_in_docker $DIND_OPTS \ | ||
-v "$WORKSPACE:$WORKSPACE:rw" \ | ||
-e TRAVIS \ | ||
"industrial-ci/prerelease" \ | ||
"$@" | ||
|
||
|
@@ -72,41 +73,26 @@ function run_ros_prerelease() { | |
|
||
ici_time_start setup_prerelease_scripts | ||
mkdir -p "$WORKSPACE/catkin_workspace/src/" | ||
local reponame=$PRERELEASE_REPONAME | ||
local clone_underlay=true | ||
if [ -z "$reponame" ]; then | ||
reponame=$TARGET_REPO_NAME | ||
mkdir -p catkin_workspace/src | ||
cp -a "$TARGET_REPO_PATH"/* "$WORKSPACE/catkin_workspace/src/" | ||
clone_underlay=false | ||
fi | ||
local reponame=${PRERELEASE_REPONAME:-$TARGET_REPO_NAME} | ||
cp -a "$TARGET_REPO_PATH" "$WORKSPACE/catkin_workspace/src/$reponame" | ||
|
||
# ensure access rights | ||
ici_run_cmd_in_docker $DIND_OPTS -v "$WORKSPACE:$WORKSPACE:rw" --user root "industrial-ci/prerelease" chown -R ci:ci $WORKSPACE | ||
|
||
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 "${reponame}" --level "$downstream_depth" --output-dir . | ||
ici_time_end # setup_prerelease_scripts | ||
|
||
if [ "$clone_underlay" = true ]; then | ||
ici_time_start prerelease_clone_underlay.sh | ||
run_in_prerelease_docker ./prerelease_clone_underlay.sh | ||
ici_time_end # prerelease_clone_underlay | ||
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 | ||
|
||
ici_time_start prerelease_build_underlay.sh | ||
run_in_prerelease_docker ./prerelease_build_underlay.sh | ||
run_in_prerelease_docker catkin_test_results $WORKSPACE/catkin_workspace/test_results | ||
ici_time_end # prerelease_build_underlay.sh | ||
|
||
if [ "$downstream_depth" != "0" ]; then | ||
ici_time_start run_prerelease_clone_overlay.sh | ||
run_in_prerelease_docker ./prerelease_clone_overlay.sh | ||
ici_time_end # run_prerelease_clone_overlay | ||
ici_time_start prerelease_build_overlay.sh | ||
run_in_prerelease_docker ./prerelease_build_overlay.sh | ||
run_in_prerelease_docker catkin_test_results $WORKSPACE/catkin_workspace_overlay/test_results | ||
ici_time_end # prerelease_build_overlay.sh | ||
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::::" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Just curious, are the trailing colons still needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, all of them. repo : type : url_scheme : url_path : branch |
||
ici_time_end # setup_prerelease_scripts | ||
|
||
ici_time_start prerelease.sh | ||
run_in_prerelease_docker env ABORT_ON_TEST_FAILURE=1 ./prerelease.sh -y | ||
ici_time_end # prerelease.sh | ||
|
||
echo 'ROS Prerelease Test went successful.' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we (also) want to add a job for a package that is actually depended on by maybe just one or a few packages so that we can test
PRERELEASE_DOWNSTREAM_DEPTH
? We can even add another package to mockups and inject dependency.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not possible for now. With this patch, we cannot "fake" the identity anymore, and
industrial_ci
does not have any dowstream depencies.In a later versions we might add a full rosinstall workspace as underlay, then we can test it again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I assume this new job does not test anything distinct for now other than testing
PRERELEASE_DOWNSTREAM_DEPTH
option to not cause error.