This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git


The following commit(s) were added to refs/heads/main by this push:
     new 348c03c  Fix testsall computation (#222)
348c03c is described below

commit 348c03c726d32fdc6f5992e30bb92e0b998392d9
Author: Brian Neradt <[email protected]>
AuthorDate: Tue Oct 10 14:19:54 2023 -0500

    Fix testsall computation (#222)
    
    testsall has to be computed in the src/tests directory, not in the build
    directory. src/tests is where the gold tests live.
---
 jenkins/github/autest.pipeline | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/jenkins/github/autest.pipeline b/jenkins/github/autest.pipeline
index f236007..e728b0c 100644
--- a/jenkins/github/autest.pipeline
+++ b/jenkins/github/autest.pipeline
@@ -115,6 +115,7 @@ pipeline {
                                                mkdir -p ${export_dir}
 
                                                autest_args=""
+                                               testsall=( $( find . -iname 
"*.test.py" | awk -F'/' '{print $NF}' | awk -F'.' '{print $1}' ) )
                                                if [ -d ../build ]; then
                                                        # CMake: Enter into the 
build's test directory.
                                                        cd ../build/tests
@@ -128,14 +129,13 @@ pipeline {
                                                if [ ${SHARDCNT} -le 0 ]; then
                                                        ./autest.sh 
${autest_args} || true
                                                else
-                                                       testsall=( $( find . 
-iname "*.test.py" | awk -F'/' '{print $NF}' | awk -F'.' '{print $1}' ) )
                                                        testsall=( $(
                                                          for el in  
"${testsall[@]}" ; do
                                                            echo $el
                                                          done | sort) )
                                                        ntests=${#testsall[@]}
 
-                                                                               
                          shardsize=$((${ntests} / ${SHARDCNT}))
+                                                       shardsize=$((${ntests} 
/ ${SHARDCNT}))
                                                        [ 0 -ne $((${ntests} % 
${shardsize})) ] && shardsize=$((${shardsize} + 1))
                                                        
shardbeg=$((${shardsize} * ${SHARD}))
                                                        
sliced=${testsall[@]:${shardbeg}:${shardsize}}

Reply via email to