]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Add script to prepare test case run
authorIgor Putovny <igor.putovny@nic.cz>
Tue, 5 Dec 2023 14:13:06 +0000 (15:13 +0100)
committerIgor Putovny <igor.putovny@nic.cz>
Thu, 30 May 2024 10:30:00 +0000 (12:30 +0200)
proto/aggregator/bird.conf [new file with mode: 0644]
proto/aggregator/run_test_case.sh [new file with mode: 0755]

diff --git a/proto/aggregator/bird.conf b/proto/aggregator/bird.conf
new file mode 100644 (file)
index 0000000..db8da40
--- /dev/null
@@ -0,0 +1,30 @@
+
+debug protocols all;
+debug channels all;
+
+log "bird.log" all;
+
+ipv4 table aggregated;
+
+protocol device {}
+#router id 1;
+
+attribute int distinguisher;
+
+protocol static {
+    ipv4 {
+        import filter { distinguisher = 9; accept; };
+    };
+
+    route 10.100.0.0/16 unreachable;
+}
+
+protocol aggregator {
+    table master4;
+    peer table aggregated;
+    export filter { print net; accept; };
+    aggregate on distinguisher, net;
+    merge by { accept; };
+    # defualt route unrechable;
+}
+
diff --git a/proto/aggregator/run_test_case.sh b/proto/aggregator/run_test_case.sh
new file mode 100755 (executable)
index 0000000..05a91c2
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+dir_name="trie-test-case"
+
+cd ../..
+make all
+echo '------------------------'
+
+if [[ ! -e "$dir_name" ]]; then
+    mkdir "$dir_name"
+    echo "creating directory '$dir_name'"
+fi
+
+cp ./bird ./"$dir_name"
+echo 'copying bird executable'
+
+cp ./birdc ./"$dir_name"
+echo 'copying birdc executable'
+
+cp ./proto/aggregator/bird.conf ./"$dir_name"
+echo 'copying bird.conf'
+
+cd "$dir_name"
+
+echo 'done'
+echo
+echo 'expected result: 10.100.0.0/16'