[cairo-commit] 2 commits - test/meson.build test/view-test-results.py
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 17 21:17:38 UTC 2022
test/meson.build | 5 +++++
test/view-test-results.py | 16 ++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit e562ff757bb7d88b708e07a9759c046413c52f94
Merge: a0dfb2c07 6fec25a51
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Tue May 17 21:17:36 2022 +0000
Merge branch 'view-test-results' into 'master'
Python script to view test results
See merge request cairo/cairo!327
commit 6fec25a51f2e94c64c02a8598dac4d6c3436b105
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Tue May 17 14:55:39 2022 +0930
python script to view tests results
testtables.js no longer works in modern browsers as local file access
has been disabled. This script runs a python http server that serves
the contents of the current directory then opens the test results in
the webbrowser
diff --git a/test/meson.build b/test/meson.build
index 21a0588e7..be05d30ec 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -629,6 +629,11 @@ exe = executable('cairo-test-suite', [cairo_test_suite_sources, test_sources, ca
libpdiff_dep],
)
+html_files = ['index.html', 'testtable.js', 'view-test-results.py']
+foreach file : html_files
+ configure_file(input: file, output : file, copy: true)
+endforeach
+
env = environment()
env.set('srcdir', meson.current_source_dir())
diff --git a/test/view-test-results.py b/test/view-test-results.py
new file mode 100755
index 000000000..16241fec0
--- /dev/null
+++ b/test/view-test-results.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python3
+
+import http.server
+import os
+import threading
+import webbrowser
+
+port = 8000
+
+server = http.server.ThreadingHTTPServer(("localhost", port), http.server.SimpleHTTPRequestHandler)
+thread = threading.Thread(target = server.serve_forever)
+thread.daemon = True
+thread.start()
+
+webbrowser.open_new("http://localhost:" + str(port) + "/index.html")
+input("\nPress Enter to exit\n\n")
More information about the cairo-commit
mailing list