Commit a1fe2296 authored by Christian Kellner's avatar Christian Kellner
Browse files

Add an id (UUID) to each test run

That will make it easy to globally identify runs, which might come
in handy especially if we synchronize runs into a central database.
parent 34e0664c
......@@ -14,6 +14,7 @@ struct _GbbTestRun {
GObject parent;
GbbBatteryTest *test;
char *id;
char *filename;
char *name;
char *description;
......@@ -63,6 +64,7 @@ gbb_test_run_finalize(GObject *object)
static void
gbb_test_run_init(GbbTestRun *run)
run->id = uuid_gen_new();
run->history = g_queue_new();
......@@ -310,6 +312,8 @@ gbb_test_run_write_to_file(GbbTestRun *run,
JsonBuilder *builder = json_builder_new();
json_builder_set_member_name(builder, "id");
json_builder_add_string_value(builder, run->id);
json_builder_set_member_name(builder, "test-id");
json_builder_add_string_value(builder, run->test->id);
json_builder_set_member_name(builder, "test-name");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment