From: Jonathan Rajotte Date: Tue, 3 Apr 2018 20:36:42 +0000 (-0400) Subject: Tests: Use for loop for identical validation X-Git-Tag: v2.11.0-rc1~275 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=3a9c3e865f8aba96ac2b2ab443d72d1b12fd2a16;p=lttng-tools.git Tests: Use for loop for identical validation Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/rotation/rotate_utils.sh b/tests/regression/tools/rotation/rotate_utils.sh index a90c1fea0..80b2eb753 100644 --- a/tests/regression/tools/rotation/rotate_utils.sh +++ b/tests/regression/tools/rotation/rotate_utils.sh @@ -67,10 +67,10 @@ function validate_test_chunks () # Make sure we don't have anything else in the first 2 chunk directories # besides the kernel folder. - nr_stale=$(\ls $local_path/${chunk_pattern}-1 | grep -v $domain | wc -l) - ok $nr_stale "No stale folders in chunk 1 directory" - nr_stale=$(\ls $local_path/${chunk_pattern}-2 | grep -v $domain | wc -l) - ok $nr_stale "No stale folders in chunk 2 directory" + for chunk in $(seq 1 2); do + nr_stale=$(ls -A $local_path/${chunk_pattern}-${chunk} | grep -v $domain | wc -l) + ok $nr_stale "No stale folders in chunk ${chunk} directory" + done # We expect a complete session of 30 events validate_trace_count $EVENT_NAME $local_path 30