mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2189 from akva2/add_diff_as_comment
Add ascii diff of changes to data update PR
This commit is contained in:
commit
0d7b7f6e00
@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
OPM_TESTS_ROOT=$1
|
OPM_TESTS_ROOT=$1
|
||||||
|
TMPDIR=`mktemp -d`
|
||||||
|
mkdir $TMPDIR/orig
|
||||||
|
mkdir $TMPDIR/new
|
||||||
|
|
||||||
# Copy results from a test run to refence dir
|
# Copy results from a test run to refence dir
|
||||||
# $1 = source directory to copy data from
|
# $1 = source directory to copy data from
|
||||||
@ -26,6 +29,11 @@ copyToReferenceDir () {
|
|||||||
diff -q "$WORKSPACE/$SRC_DIR$STEM.$filetype" "$DST_DIR/$STEM.$filetype"
|
diff -q "$WORKSPACE/$SRC_DIR$STEM.$filetype" "$DST_DIR/$STEM.$filetype"
|
||||||
if test $? -ne 0
|
if test $? -ne 0
|
||||||
then
|
then
|
||||||
|
cp $WORKSPACE/$SRC_DIR$STEM.$filetype $TMPDIR/new
|
||||||
|
$configuration/install/bin/convertECL $TMPDIR/new/$STEM.$filetype
|
||||||
|
cp $DST_DIR/$STEM.$filetype $TMPDIR/orig
|
||||||
|
$configuration/install/bin/convertECL $TMPDIR/orig/$STEM.$filetype
|
||||||
|
diff -u $TMPDIR/orig/$STEM.F$filetype $TMPDIR/new/$STEM.F$filetype >> $WORKSPACE/data_diff
|
||||||
cp "$WORKSPACE/$SRC_DIR$STEM.$filetype" $DST_DIR
|
cp "$WORKSPACE/$SRC_DIR$STEM.$filetype" $DST_DIR
|
||||||
DIFF=0
|
DIFF=0
|
||||||
fi
|
fi
|
||||||
@ -141,3 +149,5 @@ then
|
|||||||
else
|
else
|
||||||
git commit -a -F /tmp/cmsg
|
git commit -a -F /tmp/cmsg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -rf $TMPDIR
|
||||||
|
Loading…
Reference in New Issue
Block a user