mirror of
https://github.com/rosenpass/rosenpass.git
synced 2025-12-12 15:49:22 -08:00
feat: Regression CI based on misc/generate_configs.py
This commit is contained in:
committed by
Paul Spooren
parent
010c14dadf
commit
d0a6e99a1f
33
.ci/run-regression.sh
Executable file
33
.ci/run-regression.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
iterations=$1
|
||||
sleep_time=$2
|
||||
|
||||
PWD=$(pwd)
|
||||
EXEC=$PWD/target/release/rosenpass
|
||||
LOGS=$PWD/output/logs
|
||||
|
||||
mkdir -p output/logs
|
||||
|
||||
run_command() {
|
||||
local file=$1
|
||||
local log_file="$2"
|
||||
($EXEC exchange-config $file 2>&1 | sed "s/^/[$2] /" | 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+=($!)
|
||||
done
|
||||
|
||||
sleep $sleep_time
|
||||
|
||||
lsof -i :9999 | awk 'NR!=1 {print $2}' | xargs kill
|
||||
|
||||
for (( x=0; x<$iterations; x++ )); do
|
||||
port=$((x + 50000))
|
||||
lsof -i :$port | awk 'NR!=1 {print $2}' | xargs kill
|
||||
done
|
||||
Reference in New Issue
Block a user