diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:25:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:25:44 +0000 |
commit | e20628db512128d3a5c66360943462b83da5f049 (patch) | |
tree | d0c586bb2b3ce26a240c5fb0765982ce87d53816 /debian/jstest/run-tests | |
parent | Adding upstream version 7.2.6. (diff) | |
download | sphinx-e20628db512128d3a5c66360943462b83da5f049.tar.xz sphinx-e20628db512128d3a5c66360943462b83da5f049.zip |
Adding debian version 7.2.6-6.debian/7.2.6-6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/jstest/run-tests')
-rwxr-xr-x | debian/jstest/run-tests | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/jstest/run-tests b/debian/jstest/run-tests new file mode 100755 index 0000000..1285ccd --- /dev/null +++ b/debian/jstest/run-tests @@ -0,0 +1,40 @@ +#!/usr/bin/python3 + +import os +import sys + +import jstest + +from PyQt6.QtWidgets import QApplication + +class t1: + search_term = 'example' + n_results = 85 + n_links = 85 + n_highlights = 101 + +class t2: + search_term = 'examples' + n_results = 76 + n_links = 76 + n_highlights = 17 + +class t3: + search_term = 'graph' + n_results = 33 + n_links = 33 + n_highlights = 124 + +if __name__ == '__main__': + if not os.getenv('DISPLAY'): + raise RuntimeError('These tests require access to an X server') + app = QApplication(sys.argv) + [build_directory] = sys.argv[1:] + build_directory = os.path.abspath(build_directory) + n_failures = 0 + for testcase in t1, t2, t3: + failures = jstest.test_directory(build_directory, testcase).failures + n_failures += len(failures) + sys.exit(n_failures > 0) + +# vim:ts=4 sw=4 et |