Skip to content

Commit

Permalink
MAKEALL: Add some tracking of which config we are building
Browse files Browse the repository at this point in the history
It is informative to add which config we are building and how many other
configs are remaining so that we know if we can grab a coffee and be
back or do the classic https://xkcd.com/303/

Signed-off-by: Nishanth Menon <[email protected]>
  • Loading branch information
nmenon committed Aug 8, 2024
1 parent b3c24e1 commit be2e8f6
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion MAKEALL
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,23 @@ build_config() {
mkdir -p $BASE_FOLDER
make gitdesc 2>$BASE_FOLDER/git-revs.txt

C_T=`echo $DEFCONFIGS|wc -w`
C_C=1

ETA="Unknown"
T1=`date +%s`
AVG=0
for config in $DEFCONFIGS
do
echo Building for "$config"
build_config $config 2>&1 |tee $BASE_FOLDER/$config.txt
build_config $config 2>&1 |tee $BASE_FOLDER/$config.txt | sed -e "s,^,\[$C_C\/$C_T][Eta: $ETA] $config: ,g"
T2=`date +%s`
TD=`expr $T2 - $T1`
T_AVG=`expr $TD / $C_C`
C_REM=`expr $C_T - $C_C`
T_REM=`expr $C_REM \* $T_AVG`
ETA=`date --date="$T_REM seconds" "+%Y-%m-%d/%H:%M:%S"`
C_C=`expr $C_C + 1`
done

count=0
Expand Down Expand Up @@ -73,6 +86,10 @@ echo
echo "==> All done: See $DEPLOY_FOLDER for files and $BUILD_FOLDER for build artifacts. $BASE_FOLDER for build logs"
echo "==> Summary of Builds: ($count builds: $pass Passed, $fail Failed)"

D_AVG=`date -d@$T_AVG -u +%H:%M:%S`
D_D=`date -d@$TD -u +%H:%M:%S`
echo "===> Total Build time: $D_D, total builds=$C_T, Avergage time per build: $D_AVG"

if [ $fail -gt 0 ]; then
exit -1
fi

0 comments on commit be2e8f6

Please sign in to comment.