diff --git a/modules/miscutil/bin/testsuite.in b/modules/miscutil/bin/testsuite.in index 2245e98e8..89981e5d7 100644 --- a/modules/miscutil/bin/testsuite.in +++ b/modules/miscutil/bin/testsuite.in @@ -1,72 +1,74 @@ ## $Id$ ## Tests Python/MySQL connectivity. Called while "make". ## This file is part of the CERN Document Server Software (CDSware). ## Copyright (C) 2002 CERN. ## ## The CDSware is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## The CDSware is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDSware; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## read config variables: #include "config.wml" #include "configbis.wml" ## start Python: ## start Python: #! ## $Id$ ## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES. """Run CDSware test suite.""" pylibdir = "/python" try: import unittest import sys except ImportError, e: print "Error: %s" % e import sys sys.exit(1) try: sys.path.append('%s' % pylibdir) from cdsware.config import version from cdsware import search_engine_tests from cdsware import bibindex_engine_tests + from cdsware import bibindex_engine_stemmer_tests from cdsware import bibrank_record_sorter_tests from cdsware import bibrank_tag_based_indexer_tests from cdsware import bibrecord_tests except ImportError, e: print "Error: %s" % e import sys sys.exit(1) def create_all_test_suites(): """Return all tests suites for all CDSware modules.""" return unittest.TestSuite((search_engine_tests.create_test_suite(), bibindex_engine_tests.create_test_suite(), + bibindex_engine_stemmer_tests.create_test_suite(), bibrecord_tests.create_test_suite(), bibrank_record_sorter_tests.create_test_suite(), bibrank_tag_based_indexer_tests.create_test_suite())) def print_info_line(): """Prints info line about tests to be executed.""" info_line = """CDSware v%s test suite results:""" % version print info_line print "=" * len(info_line) if __name__ == "__main__": print_info_line() unittest.TextTestRunner(verbosity=2).run(create_all_test_suites()) diff --git a/modules/miscutil/bin/testsuite.wml b/modules/miscutil/bin/testsuite.wml index 2245e98e8..89981e5d7 100644 --- a/modules/miscutil/bin/testsuite.wml +++ b/modules/miscutil/bin/testsuite.wml @@ -1,72 +1,74 @@ ## $Id$ ## Tests Python/MySQL connectivity. Called while "make". ## This file is part of the CERN Document Server Software (CDSware). ## Copyright (C) 2002 CERN. ## ## The CDSware is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later version. ## ## The CDSware is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with CDSware; if not, write to the Free Software Foundation, Inc., ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. ## read config variables: #include "config.wml" #include "configbis.wml" ## start Python: ## start Python: #! ## $Id$ ## DO NOT EDIT THIS FILE! IT WAS AUTOMATICALLY GENERATED FROM CDSware WML SOURCES. """Run CDSware test suite.""" pylibdir = "/python" try: import unittest import sys except ImportError, e: print "Error: %s" % e import sys sys.exit(1) try: sys.path.append('%s' % pylibdir) from cdsware.config import version from cdsware import search_engine_tests from cdsware import bibindex_engine_tests + from cdsware import bibindex_engine_stemmer_tests from cdsware import bibrank_record_sorter_tests from cdsware import bibrank_tag_based_indexer_tests from cdsware import bibrecord_tests except ImportError, e: print "Error: %s" % e import sys sys.exit(1) def create_all_test_suites(): """Return all tests suites for all CDSware modules.""" return unittest.TestSuite((search_engine_tests.create_test_suite(), bibindex_engine_tests.create_test_suite(), + bibindex_engine_stemmer_tests.create_test_suite(), bibrecord_tests.create_test_suite(), bibrank_record_sorter_tests.create_test_suite(), bibrank_tag_based_indexer_tests.create_test_suite())) def print_info_line(): """Prints info line about tests to be executed.""" info_line = """CDSware v%s test suite results:""" % version print info_line print "=" * len(info_line) if __name__ == "__main__": print_info_line() unittest.TextTestRunner(verbosity=2).run(create_all_test_suites())