Tests: Use for loop for identical validation
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 3 Apr 2018 20:36:42 +0000 (16:36 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 10 Apr 2018 19:41:37 +0000 (15:41 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/rotation/rotate_utils.sh

index a90c1fea0b8cbdb75a173314264293bdec47559d..80b2eb75338dc8dc1f95fd73efcf01d570b50ef5 100644 (file)
@@ -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
This page took 0.026528 seconds and 4 git commands to generate.