@@ -610,14 +610,12 @@ static void test_write_block_protect_bottom_bit(void)
flash_reset();
}
-int main(int argc, char **argv)
+static int test_palmetto_bmc(void)
{
g_autofree char *tmp_path = NULL;
int ret;
int fd;
- g_test_init(&argc, &argv, NULL);
-
fd = g_file_open_tmp("qtest.m25p80.XXXXXX", &tmp_path, NULL);
g_assert(fd >= 0);
ret = ftruncate(fd, FLASH_SIZE);
@@ -644,8 +642,18 @@ int main(int argc, char **argv)
flash_reset();
ret = g_test_run();
-
qtest_quit(global_qtest);
unlink(tmp_path);
+
+ return ret;
+}
+
+int main(int argc, char **argv)
+{
+ int ret;
+
+ g_test_init(&argc, &argv, NULL);
+ ret = test_palmetto_bmc();
+
return ret;
}