mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 02:38:07 +02:00
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
This commit is contained in:
parent
e32b2c34f1
commit
6fec25a51f
2 changed files with 21 additions and 0 deletions
|
|
@ -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())
|
||||
|
|
|
|||
16
test/view-test-results.py
Executable file
16
test/view-test-results.py
Executable file
|
|
@ -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")
|
||||
Loading…
Add table
Reference in a new issue