Skip to content
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

WIP: opt-in to make target repo writable #123

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

target source could better describe what actually points to. target source in your workspace?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the source in TARGET_REPO_PATH?
(all other src folders are writebale anyway..)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe catkin tools or CMake already has a variable name for this and we can reuse it ? like PROJECT_SOURCE_DIR or so? https://cmake.org/Wiki/CMake_Useful_Variables

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for PROJECT_SOURCE_DIR. That sounds more common.

Meanwhile TARGET_REPO_PATH is probably an equivalent in industrial_ci. Either way, it may not be something that is exposed to end users is it as an API, except in document like this thread? So we could keep TARGET_REPO_PATH in the source code while using PROJECT_SOURCE_DIR in document, as an idea.


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.

Expand Down
1 change: 1 addition & 0 deletions industrial_ci/src/docker.env
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ UPSTREAM_WORKSPACE
USE_DEB
USE_MOCKUP
VERBOSE_OUTPUT
WRITABLE_SOURCE
7 changes: 6 additions & 1 deletion industrial_ci/src/tests/source_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down