Commit Graph

102 Commits

Author SHA1 Message Date
Anna Schumaker 4600258721 new: Add a --terse option
This causes `xfstestsdb new` to only print out the new runid, making it
easier for scripting.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2024-04-25 17:05:51 -04:00
Anna Schumaker 79fae64f37 gtk: Run the application in the done() function handler
I still build the arguments to the application in the main do_command()
handler, but delay running it so the database won't be locked allowing
other commands to still work.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 15:50:29 -05:00
Anna Schumaker 2e85870c87 list: Don't show empty xunits or tags
Up until now, we've been appending an extra column to the listed output
but allowing it to have empty entries. I'm changing this to filter out
NULL entries, since it turns out that's what I want when I use the
--tags option. I also updated the --xunits option to be consistent.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 15:14:45 -05:00
Anna Schumaker 7e6f944cde gc: Vacuum the database after garbage collecting
This patch adds a "vacuum()" function to our sqlite Connection that is
called if we detect that rows have been deleted during `xfstestsdb gc`

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 15:02:35 -05:00
Anna Schumaker dc6f5f54c3 command: Add a function to be called after the main function
The main function is run inside a sqlite transaction context, but there
are a few rare cases where we want to call a function after the main
function and outside of a transaction (such as using the sqlite 'VACUUM'
operation). This gives us a way to do that.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 14:52:42 -05:00
Anna Schumaker 06d10cf883 xfstestsdb 1.6
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 14:11:51 -05:00
Anna Schumaker 3cc3412c6d gtk: Add a TagList to the Sidebar
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 10:46:02 -05:00
Anna Schumaker 11941c3bd3 gtk: Add a TagList listmodel
This includes a treemodel property that is intended to be set on a
listview to show our tag tree.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 10:46:02 -05:00
Anna Schumaker ce2c36a0dd gtk: Add a TagDeviceList
This will be used to make a tree of tag / device / run objects for
viewing. I sort the tags so that newer ones appear towards the top of
the list.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 10:46:02 -05:00
Anna Schumaker 6c8e155a44 gtk: Add the Sidebar to the Window
And connect things so changing the runid in the sidebar changes the
displayed xfstests run.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 10:46:02 -05:00
Anna Schumaker 521c96b432 gtk: Create a Sidebar for selecting xfstests runs
I plan to have a few different ways to view and select xfstests runs, so
I use an Gtk.Stack() and Gtk.StackSwitcher() to animate switching
between the different sidebar pages.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 10:46:02 -05:00
Anna Schumaker 704eb08091 gtk: Add a CalendarView class for selecting xfstests runs by date
This combines a Calendar and RunidView to select runs on a given day.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 10:46:01 -05:00
Anna Schumaker bac99c9c54 gtk: Add a RunidView widget
This will be placed in the sidebar to display our tree of potential runs
to view. I do this as its own widget so we can reuse it for different
sidebar views.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-07 10:45:19 -05:00
Anna Schumaker 2352bc3512 gtk: Add a SidebarFactory
This will be used to make Gtk.TreeExpander rows containing a
Gtk.Label to display the XfstestsRuns on a given day.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-06 16:12:35 -05:00
Anna Schumaker 6fcb4eb5e7 gtk: Add a DateDeviceList listmodel
This contains a list of DeviceRunsList objects for every run on a given
day.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-06 14:56:01 -05:00
Anna Schumaker 70274c448c gtk: Add a ListModel for holding the XfstestsRuns attached to a device
I will add to this to create a TreeModel to display individual runs
associated with each device in the sidebar.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-11-06 14:55:01 -05:00
Anna Schumaker bf668fc936 gtk: Make the runid argument optional
And set things up so we show the sidebar when the user doesn't specify a
runid, but have it hidden when they do.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-10-06 17:10:23 -04:00
Anna Schumaker 64abc86fee gtk: Give Windows a sidebar property
This will be used to display a list of xfstests runs that the user can
select.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-10-06 16:44:17 -04:00
Anna Schumaker b05a9ecc82 gtk: Give Windows a button for toggling the sidebar
Users can press this to show and hide the sidebar overlay.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-10-06 16:43:42 -04:00
Anna Schumaker 5621847451 gtk: Put the Window child into an Adw.OverlaySplitView
The OverlaySplitView contains a sidebar area that can be toggled by the
user that I will be using to create an xfstests history browser.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-10-06 16:27:00 -04:00
Anna Schumaker f951d4c998 gtk: Add undershoots to the XunitView
Undershoot CSS classes were added in libadwaita 1.4, and look nice when
applied.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-10-06 15:59:43 -04:00
Anna Schumaker daae654b8e gtk: Improvements to the failed test output viewer
I change the icon to a "down" arrow, and update the animation direction
to go up-and-down rather than left-and-right. I also change the button
text to say "done", which is a little clearer than "back".

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-10-06 15:57:24 -04:00
Anna Schumaker 528444cab6 xfstestsdb 1.5
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-31 15:52:28 -04:00
Anna Schumaker 952889687f gtk: Add a MessagesView to the XfstestsView
This is placed in a Gtk.Stack with a nice transition to show the failed
tests log.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-31 15:35:28 -04:00
Anna Schumaker ea2913429c gtk: Create a MessagesView
The MessagesView combines two MessageViews into a split-pane card. This
lets us display stdout and stderr side-by-side to the user so they can
see what is going on. I also add a 'back' button that the user can click
to signal that they are done reviewing the output.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-31 15:34:18 -04:00
Anna Schumaker 5fb9bd6221 gtk: Create a MessageView
The message view will be used to display either stdout or stderr
messages to the user. It has built-in 'diff' detection, and adds nice
colors to the diff output if we are asked to display one.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-31 15:31:09 -04:00
Anna Schumaker 54be8f5ce3 gtk: Give the TestCaseView a show-messages signal
This simply passes on the signal from the underlying factory to be used
in a higher up layer.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-31 13:16:17 -04:00
Anna Schumaker 5a25935fed gtk: Emit a signal when a specific test result is clicked
I only do this for failing tests that have text set in their stdout or
stderr properties. I also update the CSS for failed tests to give an
indication when users hover their mouse over them.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-31 13:16:16 -04:00
Anna Schumaker 40b1d1789d gtk: Add the EnvironmentView to the XfstestsView
And set the environment property from the application after creating a
property list.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-29 17:17:34 -04:00
Anna Schumaker f44e064c89 gtk: Create an EnvironmentView
The EnvironmentView is a ColumnView configured to display environment
properties to the user. It doesn't use the firstcol property at all, so
some extra handling of the model property was needed.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-29 17:16:39 -04:00
Anna Schumaker 02452069da gtk: Create an EnvironmentFactory
This is different from our other xunit factories. Instead of displaying
values for each xunit, it looks into what we determine to be environment
properties and displays those instead.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-29 17:15:17 -04:00
Anna Schumaker 7c7e279648 model: Give the PropertyList "environment" detection
I define the envorionment as properties that are the same across each
added xunit, as long as there are more than 1 added xunits. I add an
'environment' property to make it easy to get the current set of
environment properties.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-29 16:13:07 -04:00
Anna Schumaker c861c49564 gtk: Add an XunitView base class
The XunitView implements most of the work needed by our various views to
show xfstests results.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-29 15:34:27 -04:00
Anna Schumaker a5d1ae4607 gtk: Create an XunitFactory base class
And convert most of our Factory implementations to inherit from it. This
lets me set up the xunit property in one single place, and soon I'll be
using this factory for a XunitView base class.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-29 15:27:50 -04:00
Anna Schumaker 2deb484754 xfstestsdb 1.4
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-29 10:43:41 -04:00
Anna Schumaker af1ab81ea2 gtk: Increase the default Window size
Now that we've added properties, we need a slightly larger window to
display everything clearly.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-16 10:34:21 -04:00
Anna Schumaker 3dc8179624 gtk: Add a PropertyView to the XfstestsView
And have the application create a PropertyList that is passed to the
View.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-16 10:34:21 -04:00
Anna Schumaker c145a67ae6 gtk: Add a PropertyView
The PropertyView displays the properties of each Xunit added to the
displayed Xfstests run.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-16 10:34:21 -04:00
Anna Schumaker 7ae246677b gtk: Add a PropertyFactory
The PropertyFactory is used to display the individual property rows from
each xunit.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-16 10:34:21 -04:00
Anna Schumaker 59cb699bd9 gtk: Add a PropertyList model
Along with Property, PropertyValue, and PropertyFilter objects that are used
togther to show specific properties to the user when placed in a
Gtk.ColumnView.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-16 10:34:20 -04:00
Anna Schumaker 4838889c56 gtk: Create a Factory base class
And convert our other Factory instances to inherit from it. This lets me
set up a Gtk.Inscription() in a singe way that is used everywere, and
abstract out some other binding code to make implementing new factories
easier.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-15 16:37:55 -04:00
Anna Schumaker 5dc7735ba7 gtk: Create an XunitList base class
The XunitList implements the Gio.ListModel interface, and builds in some
virtual functions to query and fill out the rows in the list in a
standard way. I also update the TestCaseList and SummaryList to both
inherit from this class.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-15 13:56:27 -04:00
Anna Schumaker c45ec1909e gtk: Create an XunitRow base class
This Object is intended to be returned by a Gio.ListModel to show
Xfstests xunit information. I change the TestCase and Summary classes to
inherit from this class, removing a lot of duplicated code.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-15 13:01:24 -04:00
Anna Schumaker ad08357121 gtk: Create a XunitCell object and rename the XunitResult object
I use the XunitCell as a base class for the (renamed) TestResult and
SettingsValue objects. This lets us combine common values and
functionality in one reusable place.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-15 13:00:51 -04:00
Anna Schumaker 4d3425bb57 xfstestsdb 1.3
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-15 10:57:27 -04:00
Anna Schumaker 455d933fc4 gtk: Create a SummaryView
The SummaryView displays a summary of the passed, failed, and skipped
tests for each xunit along with the time it took the xunit to run.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-14 16:06:32 -04:00
Anna Schumaker 8a5bc1527a gtk: Create a SummaryFactory
This is a Gtk.ListItemFactory that creates a Label widget and binds
xunit summaries to it. I use the summary field name to apply an
appropriate CSS class to each label.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-14 16:03:06 -04:00
Anna Schumaker d92b8148bf gtk: LabelFactory improvements
I add a global SizeGroup to the LabelFactory so the first column of each
table I make can have the same width. I also add style classes that are
applied with specific item values, which will mostly be used by the
SummaryView labels.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-14 16:02:21 -04:00
Anna Schumaker e14667691a gtk: Add a SummaryList Gio.ListModel
This is a list model designed to show a summary of xfstests results for
a given runid. I create a new one whenever the Application changes the
runid.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-14 13:41:05 -04:00
Anna Schumaker b143114108 gtk: Add SummaryValue and Summary objects
These are the underlying GObjects that will be returned by a SummaryList
ListModel.

Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
2023-08-14 13:41:04 -04:00