From ee2d467678665d514a84f9db6a0e8845751ce6aa Mon Sep 17 00:00:00 2001 From: rand00 Date: Tue, 10 Jan 2023 16:49:44 +0100 Subject: [PATCH] Perftest: Changed scripts for new directory structure --- packaging/perftest.sh | 9 +++++---- .../unipi/{run-test-on-vm.sh => run-test-remotely.sh} | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) rename packaging/perftest/unipi/{run-test-on-vm.sh => run-test-remotely.sh} (78%) diff --git a/packaging/perftest.sh b/packaging/perftest.sh index 013fb11..e3403d8 100755 --- a/packaging/perftest.sh +++ b/packaging/perftest.sh @@ -3,6 +3,8 @@ set -e #set -x +CONF_DIR=$(dirname "${0}") + prog_NAME=$(basename "${0}") warn() @@ -107,9 +109,8 @@ APP_ID="$(sqlite3 "$DB" "PRAGMA application_id;")" [ -z "$APP_ID" ] && die "Couldn't read application-id from '$DB'" [ "$APP_ID" -ne 1234839235 ] && die "The application-id should be = 1234839235. It is '$APP_ID'" -PERFJOB_DIR="$DATA_DIR/_performance/$JOB" -PERFSCRIPT_DIR="$PERFJOB_DIR" -#< goto think if this dir makes the most sense +PERFJOB_DIR="$DATA_DIR/_perftest/$JOB" +PERFSCRIPT_DIR="$CONF_DIR/perftest/$JOB" PERFDATA_DIR="$PERFJOB_DIR/$BIN_SHA256" if [ -d "$PERFDATA_DIR" ]; then @@ -126,7 +127,7 @@ SERVER_DIR="undefined" case "${JOB},${BIN_EXT}" in unipi,hvt) - "$PERFSCRIPT_DIR"/run-test-on-vm.sh "$PERFSCRIPT_DIR" "$PERFDATA_DIR" "$BIN" "$SERVER" "$SERVER_DIR" + "$PERFSCRIPT_DIR"/run-test-remotely.sh "$PERFSCRIPT_DIR"/remote "$PERFDATA_DIR" "$BIN" "$SERVER" "$SERVER_DIR" "$PERFSCRIPT_DIR"/plot.sh "$PERFJOB_DIR" "$CACHE_DIR" "$DB" "$JOB" "$UUID" ;; *) diff --git a/packaging/perftest/unipi/run-test-on-vm.sh b/packaging/perftest/unipi/run-test-remotely.sh similarity index 78% rename from packaging/perftest/unipi/run-test-on-vm.sh rename to packaging/perftest/unipi/run-test-remotely.sh index 6b55123..de86d64 100755 --- a/packaging/perftest/unipi/run-test-on-vm.sh +++ b/packaging/perftest/unipi/run-test-remotely.sh @@ -35,13 +35,11 @@ SERVER_W_DIR="$SERVER:$SERVER_DIR" SSH="ssh $SERVER" scp "$BIN" "$SERVER_W_DIR" -scp "$PERFSCRIPT_DIR"/init.sh "$SERVER_W_DIR" -scp "$PERFSCRIPT_DIR"/run-unikernel.sh "$SERVER_W_DIR" -scp "$PERFSCRIPT_DIR"/run-test.sh "$SERVER_W_DIR" -scp "$PERFSCRIPT_DIR"/cleanup.sh "$SERVER_W_DIR" +scp -r "$PERFSCRIPT_DIR"/* "$SERVER_W_DIR" info initializing context for unikernel -"$SSH" "$PERFSCRIPT_DIR"/init.sh +"$SSH" "$PERFSCRIPT_DIR"/init.sh & +INIT_PID=$! info running unikernel in background "$SSH" "$PERFSCRIPT_DIR"/run-unikernel.sh & @@ -56,6 +54,9 @@ info running test info killing unikernel kill "$UNIKERNEL_PID" +info killing init-daemon +kill "$INIT_PID" + info copying results to "$PERFDATA_DIR" scp "${SERVER_W_DIR}/results/*" "$PERFDATA_DIR"