kurtosis.yml, main.star; added cleanup code

This commit is contained in:
0xFugue 2023-01-11 12:40:42 +05:30
parent 895b3a1072
commit 717796c7ff
4 changed files with 19 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
usage(){
echo "Usage: ./run.sh <metal | docker | kurtosis>"
echo "Usage: ./run.sh < clean | metal | docker | kurtosis>"
exit 1
}
@ -18,6 +18,17 @@ iat="300ms"
sleep_time=5
clean(){
parent=$(pwd)
#rm -rf ./data
cd waku/$filtr
rm $prefix-$filtr
cd ..
cd $lpush
rm $prefix-$lpush
cd $parent
}
build_metal() {
parent=$(pwd)
cd waku/$filtr
@ -152,12 +163,15 @@ kurtosis_run() {
echo "$# $1"
[ 1 -eq "$#" ] || usage
[ metal != $1 -a docker != $1 -a kurtosis != $1 ] && usage
[ metal != $1 -a docker != $1 -a kurtosis != $1 -a clean != $1 ] && usage
if [ metal = $1 ]; then
if [ clean = $1 ]; then
start $1
clean
end $1
elif [ metal = $1 ]; then
build_metal
start $1
metal_run

View File

@ -2,6 +2,7 @@
"output_file": "output.out",
"duration": "1000s",
"iat": "500ms",
"mount_src": "/go/bin/out",
"mount_target": "/go/bin/out",
"log_file": "output.log"
}