Skip to content

Commit

Permalink
debugger: Don't rely on an Automake test driver implementation detail
Browse files Browse the repository at this point in the history
Don't rely on the test driver to create the subdirectory where we want
to write the tests temporary output to in `$builddir`.

Fixes tests under Ubuntu 12.04.
  • Loading branch information
b4n committed Mar 7, 2016
1 parent 635e70b commit 7c4fa2a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions debugger/src/tests/gdb_mi_test.sh
Expand Up @@ -9,11 +9,14 @@ strip_comments()
${SED:-sed} -e '/^#/d'
}

TMPOUT=tests/gdb_mi_test.output.tmp
TMPEXCPT=tests/gdb_mi_test.expected.tmp
SUBDIR=tests
TMPOUT=$SUBDIR/gdb_mi_test.output.tmp
TMPEXCPT=$SUBDIR/gdb_mi_test.expected.tmp

trap 'rm -f "$TMPOUT" "$TMPEXCPT"' EXIT QUIT TERM INT
trap 'rm -f "$TMPOUT" "$TMPEXCPT";
rmdir "$SUBDIR" 2>/dev/null || :' EXIT QUIT TERM INT

test -d "$SUBDIR" || mkdir "$SUBDIR"
strip_comments < "$srcdir/tests/gdb_mi_test.input" | ./gdb_mi_test 2> "$TMPOUT"
strip_comments < "$srcdir/tests/gdb_mi_test.expected" > "$TMPEXCPT"
diff -u "$TMPEXCPT" "$TMPOUT"

0 comments on commit 7c4fa2a

Please sign in to comment.