55f3239edc
Also: - Add some custom CSS to the widgets - Add tooltips to each test result cell - Add a popover with failing test output - Improve filtering in place of the view switches Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
41 lines
1.2 KiB
Python
Executable File
41 lines
1.2 KiB
Python
Executable File
#!/usr/bin/python
|
|
import pathlib
|
|
import reporter
|
|
import sys
|
|
from gi.repository import Gtk
|
|
|
|
class Window(Gtk.Window):
|
|
def __init__(self):
|
|
Gtk.Window.__init__(self, title="Xfstests Results")
|
|
self.chooser = reporter.TestChooser()
|
|
self.testview = reporter.TestViewer()
|
|
self.child = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, 5)
|
|
self.child.append(self.chooser)
|
|
self.child.append(self.testview)
|
|
|
|
self.set_default_size(1300, 800)
|
|
self.set_child(self.child)
|
|
|
|
self.chooser.connect("test-selected", self.test_changed)
|
|
if len(sys.argv) > 1:
|
|
self.testview.set_test_result(reporter.testchooser.Path(pathlib.Path(sys.argv[1])))
|
|
|
|
def test_changed(self, window, file):
|
|
self.testview.set_test_result(file)
|
|
|
|
|
|
class Application(Gtk.Application):
|
|
def __init__(self, *args, **kwargs):
|
|
Gtk.Application.__init__(self, *args, application_id="org.gtk.report-xfstests", **kwargs)
|
|
|
|
def do_startup(self):
|
|
Gtk.Application.do_startup(self)
|
|
self.add_window(Window())
|
|
|
|
def do_activate(self):
|
|
for window in self.get_windows():
|
|
window.present()
|
|
|
|
if __name__ == "__main__":
|
|
Application().run()
|