From 3a9c3e865f8aba96ac2b2ab443d72d1b12fd2a16 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Tue, 3 Apr 2018 16:36:42 -0400 Subject: [PATCH] Tests: Use for loop for identical validation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- tests/regression/tools/rotation/rotate_utils.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.34.1