From ffbe2a10569464746ef6159cd776fd21b034152a Mon Sep 17 00:00:00 2001 From: Dobroslaw Zybort Date: Wed, 13 Mar 2019 13:39:46 +0100 Subject: [PATCH] Don't remove tempest tests from installation folder Change-Id: I44155371b8a09a84db1a023d5dfc18068d311a64 --- docker/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 29cf2656..d3067a83 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -156,11 +156,15 @@ ONBUILD RUN \ /tmp/* \ /var/cache/apk/* \ /var/log/* && \ - # Remove all Python pyc and pyo files. + # Remove all Python pyc and pyo files. Don't remove tempest tests. find /usr/local -depth \ \( \ - \( -type d -a \( -name test -o -name tests \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ + \( -type d -and \( \ + -name test -or -name tests \ + -not -path '*/monasca_tempest_tests/*' \) \) \ + -or \ + \( -type f -and \( \ + -name '*.pyc' -or -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + ONBUILD HEALTHCHECK --interval=5s --timeout=2s \