summaryrefslogtreecommitdiffstats
path: root/tests/roof.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roof.sh')
-rwxr-xr-xtests/roof.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/roof.sh b/tests/roof.sh
new file mode 100755
index 0000000..a8fa89e
--- /dev/null
+++ b/tests/roof.sh
@@ -0,0 +1,32 @@
+#! /bin/bash
+
+. config.sh
+
+function pyroof {
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib$arch" GI_TYPELIB_PATH="/usr/local/lib$arch/girepository-1.0/" \
+ python3 roof.py "$@"
+}
+
+if [[ "$0" =~ roof-vma ]]; then
+ function roof {
+ bufs=800000
+ bufs=$((bufs * 4))
+
+ ulimit -l unlimited
+ echo 1000000000 > /proc/sys/kernel/shmmax # 18446744073692774399
+ echo 8000 > /proc/sys/vm/nr_hugepages # 0
+
+ VMA_THREAD_MODE=3 VMA_MTU=0 VMA_RX_POLL=0 VMA_SELECT_POLL=0 VMA_RING_ALLOCATION_LOGIC_RX=20 VMA_RX_BUFS=$bufs LD_PRELOAD=$vma_lib \
+ pyroof "$@"
+ }
+else
+ function roof {
+ pyroof "$@"
+ }
+fi
+
+#cat roof.yaml | sed '/simulation/,$d' | yq . > roof.json
+#cat roof.yaml | yq r - -j | jq '' | sed -r '/\[$/ {:a;N;s/\]/&/;Ta;s/\n +//g;s/,(.)/, \1/}' > roof.json
+cat roof.yaml | python3 yaml2json.py | sed -r '/\[$/ {:a;N;s/\]/&/;Ta;s/\n +//g;s/,(.)/, \1/}' > roof.json
+
+roof "$@"