Add a running log of executed commands in intest.exec

This commit is contained in:
Pim van Pelt
2022-04-10 13:57:00 +00:00
parent 929fa7b546
commit 9d60a01879

View File

@ -9,25 +9,37 @@
## Run me: ## Run me:
# ./intest.sh 2>&1 | tee intest.out # ./intest.sh 2>&1 | tee intest.out
for i in hippo[0-9]*.yaml; do
echo "Clearing: Moving to hippo-empty.yaml" rm -f "intest.exec"
../vppcfg plan -s ../schema.yaml -c hippo-empty.yaml -o /tmp/vppcfg-exec-empty
[ -s /tmp/vppcfg-exec-empty ] && vppctl exec /tmp/vppcfg-exec-empty for i in hippo[0-9]*.yaml; do
echo "Clearing: Moving to hippo-empty.yaml"
for j in hippo[0-9]*.yaml; do ../vppcfg plan -s ../schema.yaml -c hippo-empty.yaml -o /tmp/vppcfg-exec-empty
echo " - Moving to $i .. " [ -s /tmp/vppcfg-exec-empty ] && {
../vppcfg plan -s ../schema.yaml -c $i -o /tmp/vppcfg-exec_$i cat /tmp/vppcfg-exec-empty >> intest.exec
[ -s /tmp/vppcfg-exec_$i ] && vppctl exec /tmp/vppcfg-exec_$i vppctl exec /tmp/vppcfg-exec-empty
}
echo " - Moving from $i to $j" for j in hippo[0-9]*.yaml; do
../vppcfg plan -s ../schema.yaml -c $j -o /tmp/vppcfg-exec_${i}_${j} echo " - Moving to $i .. "
[ -s /tmp/vppcfg-exec_${i}_${j} ] && vppctl exec /tmp/vppcfg-exec_${i}_${j} ../vppcfg plan -s ../schema.yaml -c $i -o /tmp/vppcfg-exec_$i
[ -s /tmp/vppcfg-exec_$i ] && {
echo " - Checking that from $j to $j is empty" cat /tmp/vppcfg-exec_$i >> intest.exec
../vppcfg plan -s ../schema.yaml -c $j -o /tmp/vppcfg-exec_${j}_${j}_null vppctl exec /tmp/vppcfg-exec_$i
[ -s /tmp/vppcfg-exec_${j}_${j}_null ] && { }
echo " - ERROR Transition is not empty"
cat /tmp/vppcfg-exec_${j}_${j}_null echo " - Moving from $i to $j"
} ../vppcfg plan -s ../schema.yaml -c $j -o /tmp/vppcfg-exec_${i}_${j}
done [ -s /tmp/vppcfg-exec_${i}_${j} ] && {
cat /tmp/vppcfg-exec_${i}_${j} >> intest.exec
vppctl exec /tmp/vppcfg-exec_${i}_${j}
}
echo " - Checking that from $j to $j is empty"
../vppcfg plan -s ../schema.yaml -c $j -o /tmp/vppcfg-exec_${j}_${j}_null
[ -s /tmp/vppcfg-exec_${j}_${j}_null ] && {
echo " - ERROR Transition is not empty"
cat /tmp/vppcfg-exec_${j}_${j}_null
exit 1
}
done done
done