[geany/geany-plugins] 7c4fa2: debugger: Don't rely on an Automake test driver implementation detail

Colomban Wendling git-noreply at xxxxx
Mon Mar 7 21:40:29 UTC 2016


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Mon, 07 Mar 2016 21:40:29 UTC
Commit:      7c4fa2aa2b7cddf386470fc679ef3cbc8b63fa8b
             https://github.com/geany/geany-plugins/commit/7c4fa2aa2b7cddf386470fc679ef3cbc8b63fa8b

Log Message:
-----------
debugger: Don't rely on an Automake test driver implementation detail

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.


Modified Paths:
--------------
    debugger/src/tests/gdb_mi_test.sh

Modified: debugger/src/tests/gdb_mi_test.sh
9 lines changed, 6 insertions(+), 3 deletions(-)
===================================================================
@@ -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"



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list