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

tests: docker fixes & improvements #8263

Merged
merged 2 commits into from
Mar 18, 2021
Merged
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 tests/topotests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
libreadline-dev \
libc-ares-dev \
libcap-dev \
libelf-dev \
man \
mininet \
pkg-config \
Expand Down
1 change: 1 addition & 0 deletions tests/topotests/docker/frr-topotests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ if [ -z "$TOPOTEST_FRR" ]; then
echo "frr-topotests only works if you have your tree in git." >&2
exit 1
fi
git -C "$TOPOTEST_FRR" ls-files -z > "${TOPOTEST_LOGS}/git-ls-files"
fi

if [ -z "$TOPOTEST_BUILDCACHE" ]; then
Expand Down
12 changes: 4 additions & 8 deletions tests/topotests/docker/inner/compile_frr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,15 @@ CDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [ "${TOPOTEST_CLEAN}" != "0" ]; then
log_info "Cleaning FRR builddir..."
rm -rf $FRR_SYNC_DIR $FRR_BUILD_DIR &> /dev/null
rm -rf $FRR_BUILD_DIR &> /dev/null
fi

log_info "Syncing FRR source with host..."
mkdir -p $FRR_SYNC_DIR
mkdir -p $FRR_BUILD_DIR
rsync -a --info=progress2 \
--exclude '*.o' \
--exclude '*.lo'\
--from0 --files-from=/tmp/git-ls-files \
--chown root:root \
$FRR_HOST_DIR/. $FRR_SYNC_DIR/
(cd $FRR_SYNC_DIR && git clean -xdf > /dev/null)
mkdir -p $FRR_BUILD_DIR
rsync -a --info=progress2 --chown root:root $FRR_SYNC_DIR/. $FRR_BUILD_DIR/
$FRR_HOST_DIR/. $FRR_BUILD_DIR/

cd "$FRR_BUILD_DIR" || \
log_fatal "failed to find frr directory"
Expand Down
1 change: 0 additions & 1 deletion tests/topotests/docker/inner/funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# SOFTWARE.

FRR_HOST_DIR=/root/host-frr
FRR_SYNC_DIR=/root/persist/frr-sync
FRR_BUILD_DIR=/root/persist/frr-build

if [ ! -L "/root/frr" ]; then
Expand Down