mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
test driver script: fix off-by-one error when calculating the number of timesteps
(the initial solution also counts but was not counted.)
This commit is contained in:
parent
81ae2566d7
commit
f3e2454b4e
@ -91,7 +91,7 @@ case "$TEST_TYPE" in
|
||||
echo "RND: '$RND'"
|
||||
|
||||
SIM_NAME=$(grep "Applying the initial solution of the" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
|
||||
NUM_TIMESTEPS=$(grep "Time step [0-9]* done" "test-$RND.log" | wc -l)
|
||||
NUM_TIMESTEPS=$(( $(grep "Time step [0-9]* done" "test-$RND.log" | wc -l) + 1))
|
||||
TEST_RESULT=$(printf "%s-%05i" "$SIM_NAME" "$NUM_TIMESTEPS")
|
||||
TEST_RESULT=$(ls -- "$TEST_RESULT".*)
|
||||
rm "test-$RND.log"
|
||||
@ -120,7 +120,7 @@ case "$TEST_TYPE" in
|
||||
fi
|
||||
|
||||
SIM_NAME=$(grep "Applying the initial solution of the" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
|
||||
NUM_TIMESTEPS=$(grep "Time step [0-9]* done" "test-$RND.log" | wc -l)
|
||||
NUM_TIMESTEPS=$(( $(grep "Time step [0-9]* done" "test-$RND.log" | wc -l) + 1))
|
||||
rm "test-$RND.log"
|
||||
|
||||
echo "Simulation name: '$SIM_NAME'"
|
||||
|
Loading…
Reference in New Issue
Block a user