Commit fc9e8844 authored by Ron Rahaman's avatar Ron Rahaman

Added verification values for integration_example

parent f518b39d
Pipeline #2769 failed with stages
in 101 minutes and 52 seconds
......@@ -2,7 +2,8 @@ stages:
- build_libmesh_stage
- configure_giraffe_stage
- build_giraffe_stage
- test_giraffe_stage
- run_giraffe_stage
- verify_giraffe_stage
before_script:
- . /opt/moose/environments/moose_profile
......@@ -40,8 +41,8 @@ build_giraffe:
- cd examples/integration_example/
- make -j8
test_giraffe:
stage: test_giraffe_stage
run_giraffe:
stage: run_giraffe_stage
dependencies:
- build_giraffe
variables:
......@@ -49,5 +50,22 @@ test_giraffe:
MOOSE_DIR: "$CI_PROJECT_DIR/moose"
LIBMESH_DIR: "$CI_PROJECT_DIR/moose/libmesh/installed"
script:
- set -o pipefail
- cd examples/integration_example
- ../../giraffe-opt -i coefficient_integration.i | tee integration_example.stdout
- exit $?
verify_giraffe:
stage: verify_giraffe_stage
dependencies:
- run_giraffe
script:
- cd examples/integration_example
- v1=$(grep "Heat balance" integration_example.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 5)
- v2=$(grep "Heat balance" integration_example.stdout | tail -1 | tr -s ' ' | cut -d ' ' -f 6)
# We want to test this statement:
# (0.78529 < $v1 < 0.78549) && (0.78203 < $v2 < 0.78203)
# However, bc will return 1 if true, and we want the script to return 0 if successful
# Hence, we test the inverse of that statement. The inverse statement will
# return 0 if the *desired* condition is true.
- echo "$v1 < 0.78529825617157133 || $v1 > 0.78549825617157133 || $v2 < 0.78203376069904283 || $v2 > 0.78223376069904283" | bc
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