1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-05 18:45:01 +01:00

test.sh Add summary build time for each each

Adding summary build time for each test image.  This is somewhat
in preparation to hopefully being able to reduce the build times
for the images.

Closes: #850
Approved by: baude
This commit is contained in:
Brent Baude
2017-01-26 13:30:10 -06:00
committed by Atomic Bot
parent 4ef3d4e2b8
commit 5eb74590ee
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,6 @@ from . import util
from .Export import export_docker
from .Import import import_docker
from .util import NoDockerDaemon, default_docker_lib
import subprocess
try:
from subprocess import DEVNULL # pylint: disable=no-name-in-module

View File

@@ -113,15 +113,16 @@ make_docker_images () {
if [[ -d "${df}.d" ]]; then
cp -r "${df}.d" "${WORK_DIR}/${BASE_NAME}.d"
fi
SECONDS=0
${DOCKER} build -t ${iname} -f ${df_cp} ${WORK_DIR} >> ${LOG}
DURATION=$SECONDS
# Clean up build files.
rm "${df_cp}"
if [[ -d "${WORK_DIR}/${BASE_NAME}.d" ]]; then
rm -r "${WORK_DIR}/${BASE_NAME}.d"
fi
printf "\tBuilt : ${iname}\n"
printf "\tBuilt : ${iname} in $DURATION seconds\n"
done
}