diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25b0beb..bc2fb71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: run: | mkdir -p logs html_summaries json_results docker compose up -d spark - docker compose run --rm --no-deps plan_executor ./execute_all.sh 'http://spark:8080/fhir' r4 'html|json|stdout' + docker compose run --rm --no-deps plan_executor ./execute_all.sh 'http://spark:8080/fhir' r4 'html|json|stdout' 2>&1 | tee logs/execute_all.log docker compose logs spark > logs/backend.log - name: Combine test results diff --git a/README.md b/README.md index 803e410..06c6987 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,20 @@ Run a DSTU2 Suite $ bundle exec rake crucible:execute[http://hapi.fhir.org/baseDstu2,dstu2,TransactionAndBatchTest] ``` +## Logging Output + +The shell scripts output directly to stdout/stderr. To save logs to a file while also displaying output, use `tee`: + +``` +$ ./execute_all.sh http://localhost:8080/fhir r4 'html|json|stdout' 2>&1 | tee logs/execute_all.log +``` + +To redirect output to a file only (silent): + +``` +$ ./execute_all.sh http://localhost:8080/fhir r4 'html|json|stdout' > logs/execute_all.log 2>&1 +``` + ## Adding a New Test Suite 1. Fork the repo diff --git a/execute_all.sh b/execute_all.sh index 59df413..ad15e13 100755 --- a/execute_all.sh +++ b/execute_all.sh @@ -6,6 +6,6 @@ FHIR_ENDPOINT_URL=$1 FHIR_VERSION=$2 TEST_OUTPUT=$3 -bundle exec rake crucible:execute_all[$FHIR_ENDPOINT_URL,$FHIR_VERSION,$TEST_OUTPUT] > logs/execute_all.log 2>&1 +bundle exec rake crucible:execute_all[$FHIR_ENDPOINT_URL,$FHIR_VERSION,$TEST_OUTPUT] diff --git a/execute_test.sh b/execute_test.sh index 790f364..2827ad8 100755 --- a/execute_test.sh +++ b/execute_test.sh @@ -7,4 +7,4 @@ FHIR_VERSION=$2 TEST=$3 TEST_OUTPUT=$4 -bundle exec rake crucible:execute[$FHIR_ENDPOINT_URL,$FHIR_VERSION,$TEST,,$TEST_OUTPUT] > logs/execute_$TEST.log 2>&1 +bundle exec rake crucible:execute[$FHIR_ENDPOINT_URL,$FHIR_VERSION,$TEST,,$TEST_OUTPUT] diff --git a/list_all.sh b/list_all.sh index dd6903c..b184b9b 100755 --- a/list_all.sh +++ b/list_all.sh @@ -4,4 +4,4 @@ set -e FHIR_VERSION=$1 -bundle exec rake crucible:list_all[$FHIR_VERSION] > logs/list_all.log 2>&1 +bundle exec rake crucible:list_all[$FHIR_VERSION]