#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created by René Meusel
This file is part of the CernVM File System auxiliary tools.
"""

# make the unittests ignore the installed version of the cvmfs python package
# Note: this assumes the current directory layout of the package and the tests
import os, sys, inspect
cmd_folder =  os.path.dirname(
                os.path.dirname(
                  os.path.realpath(
                    os.path.abspath(
                      os.path.split(
                        inspect.getfile(inspect.currentframe())
                      )[0]
                    )
                  )
                )
              )

if cmd_folder not in sys.path:
    sys.path.insert(0, cmd_folder)

from manifest_test     import *
from whitelist_test    import *
from md5_handling_test import *

import unittest

if __name__ == '__main__':
    unittest.main()

@@ -830,61 +830,674 @@
 ort 
-unittest%0A%0Aif __name__ == '__main__':%0A    unittest.main(
+optparse%0Aimport sys%0Aimport unittest%0Afrom xmlrunner import XMLTestRunner%0A%0Aif __name__ == '__main__':%0A    parser = optparse.OptionParser()%0A    parser.add_option(%22-x%22, %22--xml-prefix%22,%0A                      dest=%22xml_prefix%22,%0A                      help=%22generate XML test report in given directory%22,%0A                      default=None)%0A    (options, args) = parser.parse_args()%0A    new_argv = %5B sys.argv%5B0%5D %5D%0A    new_argv.extend(args)%0A    sys.argv = new_argv%0A%0A    runner = None%0A    if options.xml_prefix:%0A      runner = XMLTestRunner(output=options.xml_prefix, verbosity=2)%0A    else:%0A      runner = unittest.TextTestRunner(verbosity=2)%0A%0A    unittest.main(testRunner=runner
 )%0A

allow generation of XML output