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>
This command doesn't do much at the moment, it simply sets up the Gtk
Application and then exits. The actual UI will be built up over the next
several patches.
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This command is used to garbage collect the xfstestsdb sqlite database.
It removes xfstests runs that have no added xunits, and runs older than
180 days that have not been tagged.
Implements: #16 (`xfstestsdb gc`)
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This command generates a table from the testcases that have been added
to a single run so the results of each testcase can be seen
side-by-side.
Implements: #9 (`xfstestsdb show`)
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This subcomand doesn't actually do anything. It'll act as a hub for
testcase related subcommands instead.
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This subcommand doesn't actually do anything, it'll act as a hub for
xunit related subcommands instead.
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This uses the Table class to print out a list of xfstests runs in a
table. It supports '--device=', '--tags=', and '--timestamp=' options
that can be used to generate a SQLite GLOB expression to filter the
list of results.
Implements: #10 (`xfstestsdb list`)
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This command deletes a row from the xfstests_runs table and prints
either a success or failure message depending on if the row exists.
I use an sqlite trigger to automatically remove tags for the matching run.
Implements: #2 (`xfstestsdb delete`)
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This is the opposite of `xfstestsdb tag`, and removes a tag from an
xfstests run.
Implements: #7 (`xfstestsdb untag`)
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This command renames the device in an xfstests_runs database row.
Implements: #8 (`xfstestsdb rename`)
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>
This command inserts a new row into the xfstests_runs table and prints
out the result.
Note that sqlite stores timestamps as UTC, so I use the datetime()
function to convert to localtime when returning the new row.
Implements: #1 (`xfstestsdb new`)
Signed-off-by: Anna Schumaker <anna@nowheycreamery.com>