From 87af6202ab944a521dce1266e4392c36d6b8d968 Mon Sep 17 00:00:00 2001 From: Andreas Arnesson Date: Sat, 28 Aug 2021 12:14:30 +0200 Subject: [PATCH] try fix permissions in docker --- .dbwebb/test/run.d.bash | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.dbwebb/test/run.d.bash b/.dbwebb/test/run.d.bash index 23233b4..c095154 100755 --- a/.dbwebb/test/run.d.bash +++ b/.dbwebb/test/run.d.bash @@ -72,14 +72,15 @@ Usage: 'dbwebb test ' esac done; - +echo "ssätter upp log var" # Prepare the logdir and logfile LOG_DIR="$COURSE_REPO_BASE/.log/test" [[ -d $LOG_DIR ]] || install -d "$LOG_DIR" export LOG="$( realpath "$COURSE_REPO_BASE/.log/test/$TESTSUITE.log" )" +echo "$LOG" (( $? == 0 )) || exit 2 > "$LOG" || exit 1 - +echo "klar att sätta upp log var i run.d.bash" # Export to be used in test scripts @@ -103,6 +104,7 @@ function header { # Log to summary # function doLog { + echo "inne i do log i run.d.bash" if (( $1 )); then echo "[-] $2 ===========================================================" | tee -a "$LOG" @@ -142,9 +144,9 @@ printf "[%s] %s %s %s\n" "$ACRONYM" "$TARGET" "$TESTSUITE" "$( date )" for file in "${files[@]}"; do output= target="scripts.d/${file}.d.bash" - + echo "startar ${file}.d.bash filen" echo && header "$target" - + echo "kör ${DIR}/$target" bash "${DIR}/$target" if (( $? )); then output="$MSG_FAILED $target @@ -156,10 +158,10 @@ for file in "${files[@]}"; do printf "$output" summary="$summary$output" done - +echo "skriver till log i slutet av run.d.bash" # Adding summary to log-file printf "\n\n$(header "Test summary") $summary\n" | tee -a "$LOG" - +echo "sista utskrift i slutet av run.d.bash" printf " -------------------------------------------- Saved a log of the test output: less -R '$LOG'\n" | tee -a "$LOG"