X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Frotation%2Frotate_utils.sh;fp=tests%2Fregression%2Ftools%2Frotation%2Frotate_utils.sh;h=8ac2afab7aeefbf4644d205ec61a88e251e65079;hp=2803517f21d0a3d0f08a18c93e70d8037b072562;hb=34764ec838debdb5fdb59e178b31a44047ea7229;hpb=bf1e8411c30b21bc8dd6184c9890e9885bb7d503 diff --git a/tests/regression/tools/rotation/rotate_utils.sh b/tests/regression/tools/rotation/rotate_utils.sh index 2803517f2..8ac2afab7 100644 --- a/tests/regression/tools/rotation/rotate_utils.sh +++ b/tests/regression/tools/rotation/rotate_utils.sh @@ -145,17 +145,18 @@ function rotate_timer_test () shopt -u extglob } -function wait_for_archives () +function trace_until_n_archives () { - local trace_path=$1 - local target_archive_count=$2 + local produce_events=$1 + local trace_path=$2 + local target_archive_count=$3 local archive_count=0 diag "Waiting for $target_archive_count size-based rotations to occur" while [[ archive_count -lt $target_archive_count ]] do - archive_count=$(find "$TRACE_PATH" -mindepth 2 -maxdepth 2 -type d -path "*archives*" | wc -l) - $TESTAPP_BIN -i 2000 -w 0 > /dev/null 2>&1 + archive_count=$(find "$trace_path" -mindepth 2 -maxdepth 2 -type d -path "*archives*" | wc -l) + $produce_events 2000 done [[ $archive_count -eq $target_archive_count ]]