1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-11-28 08:49:44 +02:00

Deliver log in test case root folder

This commit is contained in:
Marcus Holl 2019-02-26 13:59:52 +01:00
parent 5e0148238f
commit 1da57c47d5
2 changed files with 5 additions and 8 deletions

View File

@ -1,16 +1,15 @@
#!/bin/bash
WORKSPACES_ROOT=workspaces
LOG_ROOT="logs"
[ -e "${WORKSPACES_ROOT}" ] && rm -rf ${WORKSPACES_ROOT}
[ -e "${LOG_ROOT}" ] && rm -rf ${LOG_ROOT}
mkdir -p "${LOG_ROOT}"
for f in `find . -type f -depth 2 -name '*.yml'`
do
testCase=`basename ${f%.*}`
area=`dirname ${f#*/}`
source runTest.sh "${area}" "${testCase}" &> "logs/${area}-${testCase}.log"
TEST_CASE_ROOT="${WORKSPACES_ROOT}/${area}/${testCase}"
[ -e "${TEST_CASE_ROOT}" ] && rm -rf "${TEST_CASE_ROOT}"
mkdir -p "${TEST_CASE_ROOT}"
source runTest.sh "${area}" "${testCase}" "${TEST_CASE_ROOT}" &> "${TEST_CASE_ROOT}/log.txt"
done

View File

@ -2,14 +2,12 @@
TEST_AREA=$1
TEST_CASE=$2
TEST_CASE_ROOT="workspaces/${TEST_AREA}/${TEST_CASE}"
TEST_CASE_ROOT=$3
TEST_CASE_WORKSPACE="${TEST_CASE_ROOT}/workspace"
LIBRARY_VERSION_UNDER_TEST=$(git log --format="%H" -n 1)
REPOSITORY_UNDER_TEST=${TRAVIS_REPO_SLUG:-SAP/jenkins-library}
[ -e "${TEST_CASE_ROOT}" ] && rm -rf "${TEST_CASE_ROOT}"
mkdir -p "${TEST_CASE_ROOT}"
git clone -b "${TEST_CASE}" https://github.com/sap/cloud-s4-sdk-book "${TEST_CASE_WORKSPACE}"
cp -f jenkins.yml "${TEST_CASE_WORKSPACE}"
cd "${TEST_CASE_WORKSPACE}" || exit 1