Skip to content

Commit

Permalink
try fix permissions in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArne committed Aug 28, 2021
1 parent 35d1e32 commit 87af620
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .dbwebb/test/run.d.bash
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ Usage: 'dbwebb test <flag> <arguments> <optional args...>'
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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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"

0 comments on commit 87af620

Please sign in to comment.