Skip to content

Commit

Permalink
- Adding a diff script for BuildModelRecursive.mos
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14359 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Dec 13, 2012
1 parent 17b1f2f commit d0b961e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Examples/BuildModelRecursiveDiff.sh
@@ -0,0 +1,20 @@
if ! test -f "$1"; then
echo "File \'$1\' does not exist"
fi
if ! test -f "$2"; then
echo "File \'$2\' does not exist"
fi
BUILD="tr.*/td.*/td.*td bgcolor=..FF0000.*/td.*/td.*/td.*/td.*/td"
SIM="tr.*/td.*td bgcolor=..FF0000.*/td.*/td.*/td.*/td"
SEARCH=">Modelica[A-Za-z0-9._]*(<| [(])"
REV1=`grep -o "[(]r[0-9]*" "$1" | tr -d "("`
REV2=`grep -o "[(]r[0-9]*" "$2" | tr -d "("`
grep "$BUILD" $1 | egrep -o "$SEARCH" | tr -d "<> (" > "$1.build"
grep "$BUILD" $2 | egrep -o "$SEARCH" | tr -d "<> (" > "$2.build"
echo "Build diff (failures between $REV1 and $REV2)"
diff -u "$1.build" "$2.build" | grep ^[+-]

grep "$SIM" "$1" | egrep -o "$SEARCH" | tr -d "<> (" > "$1.sim"
grep "$SIM" "$2" | egrep -o "$SEARCH" | tr -d "<> (" > "$2.sim"
echo "Sim diff (failures between $REV1 and $REV2)"
diff -u "$1.sim" "$2.sim" | grep ^[+-]

0 comments on commit d0b961e

Please sign in to comment.