From 5eb74590ee2f27ebf4e3abe88cf2e1c9c8b7c819 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Thu, 26 Jan 2017 13:30:10 -0600 Subject: [PATCH] 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 --- Atomic/storage.py | 1 - test.sh | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Atomic/storage.py b/Atomic/storage.py index 3a12133..1f91030 100644 --- a/Atomic/storage.py +++ b/Atomic/storage.py @@ -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 diff --git a/test.sh b/test.sh index 9a8af54..72a4e56 100755 --- a/test.sh +++ b/test.sh @@ -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 }