|
|
5b1bf2 |
diff --git configure.ac configure.ac
|
|
|
5b1bf2 |
index 0bd3070..1c27fa0 100644
|
|
|
5b1bf2 |
--- configure.ac
|
|
|
5b1bf2 |
+++ configure.ac
|
|
|
5b1bf2 |
@@ -160,7 +160,6 @@ AM_PATH_PYTHON([2.6], [], AC_MSG_ERROR([Python interpreter 2.6 or 2.7 required])
|
|
|
5b1bf2 |
AC_PYTHON_MODULE([pywbem], [Required])
|
|
|
5b1bf2 |
AC_PYTHON_MODULE([M2Crypto], [Required])
|
|
|
5b1bf2 |
AC_PYTHON_MODULE([argparse], [Required])
|
|
|
5b1bf2 |
-AC_PYTHON_MODULE([yaml], [Required])
|
|
|
5b1bf2 |
|
|
|
5b1bf2 |
dnl ==========================================================================
|
|
|
5b1bf2 |
dnl Check for libmicrohttpd and json-c as it is needed for REST API daemon
|
|
|
5b1bf2 |
diff --git test/plugin_test.py test/plugin_test.py
|
|
|
5b1bf2 |
index e92497c..8e0d8bc 100755
|
|
|
5b1bf2 |
--- test/plugin_test.py
|
|
|
5b1bf2 |
+++ test/plugin_test.py
|
|
|
5b1bf2 |
@@ -26,7 +26,6 @@ import argparse
|
|
|
5b1bf2 |
import collections
|
|
|
5b1bf2 |
import atexit
|
|
|
5b1bf2 |
import sys
|
|
|
5b1bf2 |
-import yaml
|
|
|
5b1bf2 |
import re
|
|
|
5b1bf2 |
import os
|
|
|
5b1bf2 |
import tempfile
|
|
|
5b1bf2 |
@@ -1273,10 +1272,15 @@ def dump_results():
|
|
|
5b1bf2 |
unittest.main exits when done so we need to register this handler to
|
|
|
5b1bf2 |
get our results out.
|
|
|
5b1bf2 |
|
|
|
5b1bf2 |
- output details (yaml) results of what we called, how it finished and how
|
|
|
5b1bf2 |
- long it took.
|
|
|
5b1bf2 |
+ If PyYAML is available we will output detailed results, else we will
|
|
|
5b1bf2 |
+ output nothing. The detailed output results of what we called,
|
|
|
5b1bf2 |
+ how it finished and how long it took.
|
|
|
5b1bf2 |
"""
|
|
|
5b1bf2 |
- sys.stdout.write(yaml.dump(dict(methods_called=results, stats=stats)))
|
|
|
5b1bf2 |
+ try:
|
|
|
5b1bf2 |
+ import yaml
|
|
|
5b1bf2 |
+ sys.stdout.write(yaml.dump(dict(methods_called=results, stats=stats)))
|
|
|
5b1bf2 |
+ except ImportError:
|
|
|
5b1bf2 |
+ sys.stdout.write("NOTICE: Install PyYAML for detailed test results\n")
|
|
|
5b1bf2 |
|
|
|
5b1bf2 |
|
|
|
5b1bf2 |
def add_our_params():
|