buffybox/unl0kr/test/helpers.sh

25 lines
422 B
Bash
Raw Normal View History

2024-03-31 10:39:34 +02:00
#!/bin/bash
2024-04-01 17:00:36 +02:00
source "$(dirname "${BASH_SOURCE[0]}")/../../test/helpers.sh"
2024-03-31 10:39:34 +02:00
2024-04-01 17:00:36 +02:00
function run_unl0kr_async() {
2024-03-31 10:39:34 +02:00
local log=$1
local conf=$2
./_build/unl0kr -v -C "$conf" > "$log" 2>&1 &
pid=$!
sleep 3
kill -9 $pid
wait $pid > /dev/null 2>&1
}
2024-04-01 17:00:36 +02:00
function run_unl0kr_sync() {
local log=$1
shift
local conf=$2
shift
local args=$@
./_build/unl0kr -v -C "$conf" $@ > "$log" 2>&1
}