From 9e01b3b7900d3656b424521223c80191ff51721c Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 12 Nov 2021 11:25:07 +0100 Subject: [PATCH 1/2] fixed: only update files if they actually changed fixes the changed tests output --- tests/update_reference_data.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/update_reference_data.sh b/tests/update_reference_data.sh index b41d6557f..f67023f63 100755 --- a/tests/update_reference_data.sh +++ b/tests/update_reference_data.sh @@ -30,7 +30,8 @@ copyToReferenceDir () { continue fi diff -q "$SRC_DIR/$STEM.$filetype" "$DST_DIR/$STEM.$filetype" - if test $? -ne 0 && test -n "$CONVERT_ECL" + res=$? + if test $res -ne 0 && test -n "$CONVERT_ECL" then cp $SRC_DIR/$STEM.$filetype $TMPDIR/new $CONVERT_ECL $TMPDIR/new/$STEM.$filetype @@ -38,8 +39,11 @@ copyToReferenceDir () { $CONVERT_ECL $TMPDIR/orig/$STEM.$filetype diff -u $TMPDIR/orig/$STEM.F$filetype $TMPDIR/new/$STEM.F$filetype >> $WORKSPACE/data_diff fi - cp "$SRC_DIR/$STEM.$filetype" $DST_DIR - DIFF=0 + if test $res -ne 0 + then + cp "$SRC_DIR/$STEM.$filetype" $DST_DIR + DIFF=0 + fi done return $DIFF From 06fe93a430e372da2c7c63189c0b96ec2c11300f Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 12 Nov 2021 11:41:47 +0100 Subject: [PATCH 2/2] changed: do not always start update_data branch from origin/master this allows for update_data from opm-tests. the generated PR will include the contents of the PR it was generated for --- tests/update_reference_data.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/update_reference_data.sh b/tests/update_reference_data.sh index f67023f63..37822df23 100755 --- a/tests/update_reference_data.sh +++ b/tests/update_reference_data.sh @@ -246,7 +246,7 @@ done cd $OPM_TESTS_ROOT if [ -n "$BRANCH_NAME" ] then - git checkout -b $BRANCH_NAME origin/master + git checkout -b $BRANCH_NAME $BRANCH_BASE fi # Add potential new files