blob: 0c58b0903a4cd7b3cafd0025a0fb13a3981c07ed [file] [log] [blame]
Eric Newberry0af79b62020-04-29 00:55:16 -07001#!/bin/bash
2# Collect logs from testing nodes
Eric Newberrye69cb692015-07-08 22:46:01 -07003
Eric Newberry0af79b62020-04-29 00:55:16 -07004if [[ ${1} == docker ]]; then
5 integPath=/home/integ/integration-tests
6 outPath=/integ/logs/${2}
7elif [[ ${1} == vbox ]]; then
8 integPath=/home/integ/integration-tests
9 outPath=/vagrant/logs/${2}
10else
11 echo "Invalid test platform specified"
12 exit 1
13fi
14
15cd ${integPath}
16tar -cf - --ignore-failed-read $(git status -s -uall --porcelain --ignored | awk '$1!="D" && $2!~".pyc$"{print $2}' | grep -v -e "^.vagrant" -e "^logs/" -e "^prepare" -e "^temp/") | tar -xf - -C "${outPath}"