| #!/bin/bash |
| # Collect logs from testing nodes |
| |
| if [[ ${1} == docker ]]; then |
| integPath=/home/integ/integration-tests |
| outPath=/integ/logs/${2} |
| elif [[ ${1} == vbox ]]; then |
| integPath=/home/integ/integration-tests |
| outPath=/vagrant/logs/${2} |
| else |
| echo "Invalid test platform specified" |
| exit 1 |
| fi |
| |
| cd ${integPath} |
| tar -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}" |