File: run-tests.py

package info (click to toggle)
python-pysolr 3.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 372 kB
  • sloc: python: 2,050; sh: 166; makefile: 9
file content (25 lines) | stat: -rwxr-xr-x 529 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python

import faulthandler
import signal
import unittest

from tests import utils as test_utils


def main():
    faulthandler.register(signal.SIGUSR1, all_threads=True)
    print("Installed SIGUSR1 handler to print stack traces: pkill -USR1 -f run-tests")

    test_utils.prepare()
    test_utils.start_solr()

    try:
        unittest.main(module="tests", verbosity=1)
    finally:
        print("Tests complete; halting Solr servers…")
        test_utils.stop_solr()


if __name__ == "__main__":
    main()