[glib-networking] proxy/tests: fix to work when neither proxy module is available



commit 77f1e6979af7feb1a9f3227e9108963b0929c90d
Author: Dan Winship <danw gnome org>
Date:   Mon May 20 10:11:47 2013 -0300

    proxy/tests: fix to work when neither proxy module is available
    
    automake ends up setting TEST_PROGS to " " in this case, but
    Makefile.decl was assuming that if TEST_PROGS is not empty then it
    contains actual tests, and then ended up bailing out by passing an no
    tests to gtester. Fix it to use $(strip) to get the right result.
    
    Also, drive-by automake warning fix in proxy/tests/Makefile.am
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700628

 Makefile.decl           |    6 +++---
 proxy/tests/Makefile.am |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.decl b/Makefile.decl
index b999c4a..2e654ad 100644
--- a/Makefile.decl
+++ b/Makefile.decl
@@ -33,13 +33,13 @@ test: test-nonrecursive
 
 # test-nonrecursive: run tests only in cwd
 test-nonrecursive: ${TEST_PROGS}
-       @test -z "${TEST_PROGS}" || ${TEST_ENVIRONMENT} ${GTESTER} --verbose ${TEST_PROGS}
+       @test -z "$(strip ${TEST_PROGS})" || ${TEST_ENVIRONMENT} ${GTESTER} --verbose ${TEST_PROGS}
 
 # test-report: run tests in subdirs and generate report
 # perf-report: run tests in subdirs with -m perf and generate report
 # full-report: like test-report: with -m perf and -m slow
 test-report perf-report full-report:   ${TEST_PROGS}
-       @test -z "${TEST_PROGS}" || { \
+       @test -z "$(strip ${TEST_PROGS})" || { \
          case $@ in \
          test-report) test_options="-k";; \
          perf-report) test_options="-k -m=perf";; \
@@ -47,7 +47,7 @@ test-report perf-report full-report:  ${TEST_PROGS}
          esac ; \
          if test -z "$$GTESTER_LOGDIR" ; then  \
            ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
-         elif test -n "${TEST_PROGS}" ; then \
+         elif test -n "$(strip ${TEST_PROGS})" ; then \
            ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
          fi ; \
        }
diff --git a/proxy/tests/Makefile.am b/proxy/tests/Makefile.am
index ad5dd3c..9ed9454 100644
--- a/proxy/tests/Makefile.am
+++ b/proxy/tests/Makefile.am
@@ -19,4 +19,4 @@ if HAVE_LIBPROXY
 TEST_PROGS += libproxy
 endif
 
-EXTRA_DIST = common.c
+EXTRA_DIST += common.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]