Commit cf4fc49c authored by F-WRunTime's avatar F-WRunTime

update loggint o publish results on pass AND FAIL

parent 13c16d45
...@@ -72,24 +72,27 @@ docker_exec () { ...@@ -72,24 +72,27 @@ docker_exec () {
docker exec --workdir /home/user/workspace ${CONTAINER_NAME} $@ docker exec --workdir /home/user/workspace ${CONTAINER_NAME} $@
} }
# Define the function to run on failure dump_log_results(){
on_failure() {
notif "Something went wrong. Running cleanup..." notif "Something went wrong. Running cleanup..."
notif "Creating Tar of Proof Results" notif "Creating Tar of Proof Results"
docker exec ${CONTAINER_NAME} tar -czvf results.tar.gz kout/proofs docker exec ${CONTAINER_NAME} tar -czvf results.tar.gz kout/proofs
notif "Copying Tests Results to Host" notif "Copying Tests Results to Host"
blank_line blank_line
docker cp ${CONTAINER_NAME}:/home/user/workspace/results.tar.gz . docker cp ${CONTAINER_NAME}:/home/user/workspace/results.tar.gz ./kontrol-results_$(date +'%Y-%m-%d-%H-%M-%S').tar.gz
notif "Stopping Docker Container"
blank_line
notif "Dump Logs" notif "Dump Logs"
LOG_FILE="run-kontrol-$(date +'%Y-%m-%d-%H-%M-%S').log" LOG_FILE="run-kontrol-$(date +'%Y-%m-%d-%H-%M-%S').log"
docker logs ${CONTAINER_NAME} > $LOG_FILE docker logs ${CONTAINER_NAME} > $LOG_FILE
}
# Define the function to run on failure
on_failure() {
dump_log_results
notif "Stopping Docker Container" notif "Stopping Docker Container"
docker stop ${CONTAINER_NAME} # docker stop ${CONTAINER_NAME}
blank_line blank_line
notif "Cleanup complete." notif "Cleanup complete."
...@@ -143,6 +146,8 @@ start_docker ...@@ -143,6 +146,8 @@ start_docker
kontrol_build kontrol_build
kontrol_prove kontrol_prove
dump_log_results
blank_line blank_line
notif "DONE" notif "DONE"
blank_line blank_line
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment