Skip to content

Commit

Permalink
- Also handle tests that crash omc
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14372 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Dec 14, 2012
1 parent 87bb2e0 commit 8cb7d67
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Examples/BuildModelRecursiveDiff.sh
Expand Up @@ -4,17 +4,18 @@ 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"
BUILD="(<tr><td bgcolor=.#ff0000)|(tr.*/td.*/td.*td bgcolor=..FF0000.*/td.*/td.*/td.*/td.*/td)"
SIM="(<tr><td bgcolor=.#ff0000)|(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"
egrep "$BUILD" $1 | egrep -o "$SEARCH" | tr -d "<> (" > "$1.build"
egrep "$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"
egrep "$SIM" "$1" | egrep -o "$SEARCH" | tr -d "<> (" > "$1.sim"
egrep "$SIM" "$2" | egrep -o "$SEARCH" | tr -d "<> (" > "$2.sim"
echo "Sim diff (failures between $REV1 and $REV2)"
diff -u "$1.sim" "$2.sim" | grep "^[+-][A-Za-z0-9._]"
rm -f "$1.build" "$2.build" "$1.sim" "$2.sim"

0 comments on commit 8cb7d67

Please sign in to comment.