Use tmp directory for log files 90/3090/6
authorJan Gelety <jgelety@cisco.com>
Thu, 22 Sep 2016 12:27:41 +0000 (14:27 +0200)
committerJan Gelety <jgelety@cisco.com>
Sun, 25 Sep 2016 18:26:06 +0000 (20:26 +0200)
- store log files in tmp directory and exclude all files in this
  directory from archiving when creating tarballs

Change-Id: Ie3e11670c9d466c5fcf41d03ccd0a7bbb04ffeb0
Signed-off-by: Jan Gelety <jgelety@cisco.com>
bootstrap.sh
resources/libraries/python/SetupFramework.py

index 2796e50..2bd3a0f 100755 (executable)
@@ -34,11 +34,15 @@ TEST_GROUPS=("bridge_domain,dhcp,gre,honeycomb,l2_xconnect,lisp,softwire" "cop,i
 SUITE_PATH="tests.func"
 
 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-LOG_PATH="${SCRIPT_DIR}"
 
-# Create temp dir for tarballs
-mkdir ${SCRIPT_DIR}/../temp
-export TMPDIR="${SCRIPT_DIR}/../temp"
+# Create tmp dir
+mkdir ${SCRIPT_DIR}/tmp
+
+# Use tmp dir to store log files
+LOG_PATH="${SCRIPT_DIR}/tmp"
+
+# Use tmp dir for tarballs
+export TMPDIR="${SCRIPT_DIR}/tmp"
 
 SHARED_MEMORY_PATH="/run/shm"
 
index 7914d7c..1a1e991 100644 (file)
@@ -50,8 +50,8 @@ def pack_framework_dir():
     tmpfile.close()
 
     proc = Popen(
-        split("tar --exclude-vcs -zcf {0} .".format(file_name)),
-        stdout=PIPE, stderr=PIPE)
+        split("tar --exclude-vcs --exclude=./tmp --exclude=*.deb -zcf {0} .".
+              format(file_name)), stdout=PIPE, stderr=PIPE)
     (stdout, stderr) = proc.communicate()
 
     logger.debug(stdout)