diff --git a/doc/index.rst b/doc/index.rst index 4947f3cae..5c819eee2 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -187,6 +187,7 @@ Note that some of these currently tied only to a single option, but we still lea * `USE_DEB` (*DEPRECATED*: use `UPSTREAM_WORKSPACE` instead. default: true): if `true`, `UPSTREAM_WORKSPACE` will be set as `debian`. if `false`, `file` will be set. See `UPSTREAM_WORKSPACE` section for more info. * `USE_MOCKUP` (default: not set): reletive path to mockup packages to be used for the tests * `VERBOSE_OUTPUT` (default: not set): If `true`, build tool (e.g. Catkin) output prints in verbose mode. +* `WRITABLE_SOURCE` (default: false): Set this to true if you need the target source to be writable at build (not recommended). Note: You see some `*PKGS*` variables. These make things very flexible but in normal usecases you don't need to be bothered with them - just keep them blank. diff --git a/industrial_ci/src/docker.env b/industrial_ci/src/docker.env index 4b97272e4..430122a6c 100644 --- a/industrial_ci/src/docker.env +++ b/industrial_ci/src/docker.env @@ -39,3 +39,4 @@ UPSTREAM_WORKSPACE USE_DEB USE_MOCKUP VERBOSE_OUTPUT +WRITABLE_SOURCE diff --git a/industrial_ci/src/tests/source_tests.sh b/industrial_ci/src/tests/source_tests.sh index 23a558044..ce25fdcdc 100644 --- a/industrial_ci/src/tests/source_tests.sh +++ b/industrial_ci/src/tests/source_tests.sh @@ -110,8 +110,13 @@ if [ -e $CATKIN_WORKSPACE/src/.rosinstall ]; then && echo "$ROSWS ignored $TARGET_REPO_NAME found in $CATKIN_WORKSPACE/src/.rosinstall file. Its source fetched from your repository is used instead." || true) # TODO: add warn function $ROSWS update -t $CATKIN_WORKSPACE/src fi + # TARGET_REPO_PATH is the path of the downstream repository that we are testing. Link it to the catkin workspace -ln -s $TARGET_REPO_PATH $CATKIN_WORKSPACE/src +if [ "$WRITABLE_SOURCE" = true ]; then + cp -a "$TARGET_REPO_PATH" "$CATKIN_WORKSPACE/src/" +else + ln -s $TARGET_REPO_PATH $CATKIN_WORKSPACE/src +fi if [ "${USE_MOCKUP// }" != "" ]; then if [ ! -d "$TARGET_REPO_PATH/$USE_MOCKUP" ]; then