Skip to content

Commit

Permalink
TEST/BUILD: Remove do_task function and simplify the script
Browse files Browse the repository at this point in the history
  • Loading branch information
yosefe committed Apr 30, 2024
1 parent f03f3c4 commit 817e912
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions buildlib/tools/builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,22 +412,6 @@ build_fuse() {
fi
}

#
# Do a given task and update progress indicator
#
do_task() {
amount=$1
shift
# cleanup build dir before the task
[ -n "${ucx_build_dir}" ] && rm -rf ${ucx_build_dir}/*

$@

echo "##vso[task.setprogress value=$PROGRESS;]Progress Indicator"
PROGRESS=$((PROGRESS+amount))
}


az_init_modules
prepare_build

Expand Down Expand Up @@ -458,7 +442,13 @@ fi
num_tests=${#tests[@]}
for ((i=0;i<${num_tests};++i))
do
prog=$(( ((i + 1) * 100 / num_tests) - ((i * 100) / num_tests) ))
test="${tests[$index]}"
do_task ${prog} ${test}
# cleanup build dir before the task
[ -n "${ucx_build_dir}" ] && rm -rf ${ucx_build_dir}/*

# run the test
${tests[$i]}

# update progress indicator
progress=$(( (i + 1) * 100 / num_tests ))
echo "##vso[task.setprogress value=${progress}};]Progress Indicator"
done

0 comments on commit 817e912

Please sign in to comment.