From f6320c3c355212f423d47ef90375226081709ef1 Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Mon, 8 Jul 2024 14:10:42 +0200 Subject: [PATCH] ci: fixup regression test Signed-off-by: Paul Spooren --- .ci/run-regression.sh | 28 ++++++++++++++-------------- .github/workflows/regressions.yml | 2 ++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.ci/run-regression.sh b/.ci/run-regression.sh index 956b545..cf3df56 100755 --- a/.ci/run-regression.sh +++ b/.ci/run-regression.sh @@ -1,33 +1,33 @@ -#!/bin/bash +#!/usr/bin/env bash -iterations=$1 -sleep_time=$2 +iterations="$1" +sleep_time="$2" -PWD=$(pwd) -EXEC=$PWD/target/release/rosenpass -LOGS=$PWD/output/logs +PWD="$(pwd)" +EXEC="$PWD/target/release/rosenpass" +LOGS="$PWD/output/logs" -mkdir -p output/logs +mkdir -p "$LOGS" run_command() { local file=$1 local log_file="$2" - ($EXEC exchange-config $file 2>&1 | sed "s/^/[$2] /" | tee -a $log_file) & + ("$EXEC" exchange-config "$file" 2>&1 | tee -a "$log_file") & echo $! } pids=() -(cd output/dut && run_command "configs/dut-$iterations.toml" "dut.log") & piddut=$! -for (( x=0; x<$iterations; x++ )); do - (cd output/ate && run_command "configs/ate-$x.toml" "ate-$x.log") & pids+=($!) +(cd output/dut && run_command "configs/dut-$iterations.toml" "$LOGS/dut.log") +for (( x=0; x