]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
[ICoCo] Shell script to test equality between GitHub and MC version abn/decl_spec
authorabn <adrien.bruneton@cea.fr>
Mon, 10 May 2021 12:40:09 +0000 (14:40 +0200)
committerabn <adrien.bruneton@cea.fr>
Mon, 10 May 2021 12:52:03 +0000 (14:52 +0200)
src/ICoCo/github/check_consistency.sh [new file with mode: 0755]

diff --git a/src/ICoCo/github/check_consistency.sh b/src/ICoCo/github/check_consistency.sh
new file mode 100755 (executable)
index 0000000..c593745
--- /dev/null
@@ -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
+