Skip to content

Commit

Permalink
improving full test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Dec 2, 2023
1 parent c071ca7 commit 514c0df
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 45 deletions.
14 changes: 11 additions & 3 deletions .ci/parse_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def main():
stable_ref = "none"
testing_ref = "none"
unstable_ref = "none"
ros_test = 0
ros_test = False
full_coverage = False

refs = properties['git_refs']

Expand All @@ -50,12 +51,19 @@ def main():
except:
pass

ros_test = properties['ros_test']

try:
ros_test_enabled = bool(ros_test['enabled'])
except:
pass

try:
ros_test = bool(properties['ros_test'])
full_coverage = bool(ros_test['full_test_coverage'])
except:
pass

print("{} {} {} {} {} {}".format(package, url, stable_ref, testing_ref, unstable_ref, ros_test))
print("{} {} {} {} {} {} {}".format(package, url, stable_ref, testing_ref, unstable_ref, ros_test_enabled, full_coverage))

if __name__ == '__main__':
main()
33 changes: 33 additions & 0 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ catkin profile set debug

cd src

## | ---------------- clone the tested package ---------------- |

echo "$0: cloning the package"

# clone and checkout
Expand All @@ -59,6 +61,37 @@ echo "$REPOS" | while IFS= read -r REPO; do

done

## | ------- clone other packages for full test coverage ------ |

REPOS=$(./.ci/parse_yaml.py $YAML_FILE $ARCH)

echo "$REPOS" | while IFS= read -r REPO; do

$DEBUG && echo "Cloning $REPO"

PACKAGE=$(echo "$REPO" | awk '{print $1}')
URL=$(echo "$REPO" | awk '{print $2}')
BRANCH=$(echo "$REPO" | awk '{print $3}')
TEST=$(echo "$REPO" | awk '{print $6}')
FULL_COVERAGE=$(echo "$REPO" | awk '{print $7}')

if [[ "$TEST" != "True" ]]; then
continue
fi

if [[ "$FULL_COVERAGE" != "True" ]]; then
continue
fi

if [[ "$PACKAGE" == "$REPOSITORY_NAME" ]]; then
continue
fi

echo "$0: cloning '$URL --depth 1 --branch $BRANCH' into '$PACKAGE'"
git clone $URL --recurse-submodules --shallow-submodules --depth 1 --branch $BRANCH $PACKAGE

done

cd $WORKSPACE/src

echo "$0: installing rosdep dependencies"
Expand Down
Loading

0 comments on commit 514c0df

Please sign in to comment.