From 6e7af441b65e6d0b6ecec3da8c47933377ff3477 Mon Sep 17 00:00:00 2001 From: abn Date: Mon, 10 May 2021 14:40:09 +0200 Subject: [PATCH] [ICoCo] Shell script to test equality between GitHub and MC version --- src/ICoCo/github/check_consistency.sh | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 src/ICoCo/github/check_consistency.sh diff --git a/src/ICoCo/github/check_consistency.sh b/src/ICoCo/github/check_consistency.sh new file mode 100755 index 000000000..c59374507 --- /dev/null +++ b/src/ICoCo/github/check_consistency.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# +# Check that the ICoCo headers used in MEDCoupling are well synchronized with the official ICoCo version +# hosted at: +# https://github.com/cea-trust-platform/icoco-coupling +# + +rm -rf icoco-coupling +rm -rf tmp_compare + +git clone https://github.com/cea-trust-platform/icoco-coupling.git + +lst="ICoCo_DeclSpec.hxx ICoCoField.h ICoCoField.hxx ICoCoMEDDoubleField.h ICoCoMEDDoubleField.hxx ICoCoMEDIntField.h ICoCoMEDIntField.hxx" + +mkdir tmp_compare +cd tmp_compare +for f in $lst; do + tail -n+4 ../icoco-coupling/include/$f > "${f}_github" + tail -n+20 ../../$f > "${f}_mc" + diff "${f}_github" "${f}_mc" + if [ ! $? -eq 0 ]; then + echo "File $f is not the same in MEDCoupling repository and in official ICoCo GitHub repository!!" + exit 1 + fi +done + +cd .. +rm -rf icoco-coupling +rm -rf tmp_compare + -- 2.39.2