Skip to content

Commit

Permalink
storing results in NFS
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrshnmenon committed Apr 30, 2022
1 parent 2898411 commit d6ca3ba
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions vuln_templates/kubernetes_wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ usage () {
VD=${VD:-}
TARGET=${TARGET:-}
LEVEL=${LEVEL:--1}

LOG_DIR=$HOME/logs
NFS_DIR=/shared/arbiter/dataset
TEMPLATE_DIR=$(realpath $(dirname $0))

RUNNER=$TEMPLATE_DIR/run_arbiter.py


Expand Down Expand Up @@ -54,9 +57,19 @@ elif [ ! -f "$BIN_PATH" ]; then
exit 1
fi

cd $LOG_DIR

if [ -n "$LEVEL" ]; then
$RUNNER -f $VD_PATH -t $BIN_PATH -l $HOME/logs -j $HOME/logs -r $LEVEL
$RUNNER -f $VD_PATH -t $BIN_PATH -l $LOG_DIR -j $LOG_DIR -r $LEVEL
else
$RUNNER -f $VD_PATH -t $BIN_PATH -l $HOME/logs -j $HOME/logs
$RUNNER -f $VD_PATH -t $BIN_PATH -l $LOG_DIR -j $LOG_DIR
fi

if [ -z "$LEVEL" ]; then
LEVEL="N"
fi

PKG=$(echo $TARGET |cut -d'/' -f1)
LOG_PATH="$NFS_DIR/$PKG/${VD%.py}_${LEVEL}_logs"

cp -r $LOG_DIR $LOG_PATH

0 comments on commit d6ca3ba

Please sign in to comment.