Commit 1f2f5c85 authored by Jan Moskyto Matejka's avatar Jan Moskyto Matejka

Remote testing script.

Run the rtest script from a git work dir, first arg commit name
(most commonly HEAD), second arg config template (one example attached).

Run rtest-get-logs to download logs for current run of tests. Notice
that after starting the VM's, it takes tens of seconds to build Bird
everywhere and run it.
parent 69ff3f36
#!/bin/bash
set -e
USAGE="Usage (inside Bird's Git workdir): $0 commit conftemplate"
SUBDIRECTORY_OK=true
if [ -z "$1" ] || [ -z "$2" ] || [ ! -f "$2" ]; then
echo $USAGE
exit 2
fi
COMMIT=$(git rev-parse $1)
echo COMMIT is $COMMIT
. "$(git --exec-path)/git-sh-setup"
cd_to_toplevel
DIR=$(pwd)
TMPDIR=$(mktemp -d)
cp $2 $TMPDIR/$COMMIT-template.conf
pushd $TMPDIR
git init
git add $COMMIT-template.conf
git commit -m "Config template"
git fetch -q $DIR
git merge -m "automerge" -q $COMMIT
git push -f root@10.0.0.11:/var/lib/virt/nfs/bird HEAD:tmp
popd
rm -rf $TMPDIR
#!/bin/bash
DIR=$(mktemp -d)
rsync -avvz root@10.0.0.11:/var/lib/virt/nfs/tmp/ $DIR/
echo "Downloaded to $DIR ... remove after use."
log "/mnt/nfs/tmp/bird-HOSTNAME.log" all;
debug protocols all;
router id CTLIP;
ipv4 table m4;
ipv6 table m6;
protocol device {
scan time 10;
}
protocol kernel k4 {
# learn;
# persist;
table m4;
scan time 20;
export all;
debug all;
}
protocol kernel k6 {
# learn;
# persist;
table m6;
scan time 20;
export all;
debug all;
}
protocol static s4 {
import all;
export all;
debug all;
table m4;
route CTLIP/32 via CTLIP;
route 10.10.IDBIN.0/24 via CTLIP;
route 10.12.IDBIN.0/24 via CTLIP;
route 10.14.IDBIN.0/24 via CTLIP;
}
protocol static s6 {
table m6;
import all;
export all;
debug all;
route CTLIP6/128 via CTLIP6;
route fd00:11:IDHEX::/48 via CTLIP6;
route fd00:12:IDHEX::/48 via CTLIP6;
route fd00:13:IDHEX::/48 via CTLIP6;
route fd00:14:IDHEX::/48 via CTLIP6;
}
protocol bfd {
interface "INAME" {};
}
#protocol ospf2 o4 {
# table m4;
# import filter {
# if net ~ [ 10.14.0.0/16+ ] then reject;
# accept;
# };
# import keep filtered;
# export all;
# debug all;
# ecmp;
# area 0 {
# interface "INAME" { hello 5; type ptp; cost ICOST; bfd; };
# };
#}
#
#protocol ospf3 o6 {
# table m6;
# import filter {
# if net ~ [ fd00:14::/32+ ] then reject;
# accept;
# };
# export all;
# debug all;
# ecmp;
# area 0 {
# interface "INAME" { hello 5; type ptp; cost ICOST; bfd; };
# };
#}
protocol rip {
table m4;
import all;
export all;
debug all;
interface "INAME" { };
}
protocol ripng {
table m6;
import all;
export all;
debug all;
interface "INAME" { };
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment