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

[libvirt] [PATCH 02/10] tests: Document VIR_TEST_DEBUG environment variable.



Signed-off-by: Cole Robinson <crobinso redhat com>
---
 HACKING                      |   10 ++++++++++
 tests/interfacexml2xmltest.c |    2 --
 tests/statstest.c            |    2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/HACKING b/HACKING
index bcff8c6..fba7778 100644
--- a/HACKING
+++ b/HACKING
@@ -37,6 +37,16 @@ and run the tests:
 
 The latter test checks for memory leaks.
 
+If you encounter any failing tests, the VIR_TEST_DEBUG environment variable
+may help:
+
+  VIR_TEST_DEBUG=1 make check    (or)
+  VIR_TEST_DEBUG=2 make check
+
+Also, individual tests can be run from inside the 'tests/' directory, like:
+
+  ./qemuxml2xmltest
+
 (6) Update tests and/or documentation, particularly if you are adding
 a new feature or changing the output of a program.
 
diff --git a/tests/interfacexml2xmltest.c b/tests/interfacexml2xmltest.c
index 5ffebad..ed3093c 100644
--- a/tests/interfacexml2xmltest.c
+++ b/tests/interfacexml2xmltest.c
@@ -43,8 +43,6 @@ static int testCompareXMLToXMLFiles(const char *xml) {
     ret = 0;
 
  fail:
-    if (ret != 0)
-        fprintf(stderr, "expected: -------\n%s", actual);
     free(actual);
     virInterfaceDefFree(dev);
     return ret;
diff --git a/tests/statstest.c b/tests/statstest.c
index 82c0daa..819d395 100644
--- a/tests/statstest.c
+++ b/tests/statstest.c
@@ -25,7 +25,7 @@ static int testDevice(const char *path, int expect)
     if (actual == expect) {
         return 0;
     } else {
-        if (getenv("DEBUG_TESTS"))
+        if (getenv("VIR_TEST_DEBUG"))
             fprintf(stderr, "Expect %-6d Actual %-6d\n", expect, actual);
         return -1;
     }
-- 
1.6.5.rc2


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