[epiphany/mcatanzaro/tests-tmp-leftovers: 3/3] tests: add missing calls to ephy_file_helpers_shutdown()



commit 1d800e20e431447ef949f04b71da0a834d57e496
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue Jan 8 19:21:24 2019 -0600

    tests: add missing calls to ephy_file_helpers_shutdown()
    
    Otherwise we pollute /tmp with an ever-increasing number of leaked
    profile dirs.

 tests/ephy-embed-utils-test.c | 7 ++++++-
 tests/ephy-gsb-service-test.c | 7 ++++++-
 tests/ephy-migration-test.c   | 7 ++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/tests/ephy-embed-utils-test.c b/tests/ephy-embed-utils-test.c
index d921bac01..c6435a7bd 100644
--- a/tests/ephy-embed-utils-test.c
+++ b/tests/ephy-embed-utils-test.c
@@ -130,6 +130,7 @@ test_is_empty (const IsEmptyTest *test)
 int
 main (int argc, char *argv[])
 {
+  int ret;
   guint i;
   gtk_test_init (&argc, &argv);
 
@@ -192,5 +193,9 @@ main (int argc, char *argv[])
     g_free (test_name);
   }
 
-  return g_test_run ();
+  ret = g_test_run ();
+
+  ephy_file_helpers_shutdown ();
+
+  return ret;
 }
diff --git a/tests/ephy-gsb-service-test.c b/tests/ephy-gsb-service-test.c
index ce78581c6..b86236635 100644
--- a/tests/ephy-gsb-service-test.c
+++ b/tests/ephy-gsb-service-test.c
@@ -256,6 +256,7 @@ test_ephy_gsb_service_verify_url (void)
 int
 main (int argc, char *argv[])
 {
+  int ret;
   GError *error = NULL;
 
   gtk_test_init (&argc, &argv);
@@ -276,5 +277,9 @@ main (int argc, char *argv[])
   g_test_add_func ("/lib/safe-browsing/test_ephy_gsb_service_verify_url",
                    test_ephy_gsb_service_verify_url);
 
-  return g_test_run ();
+  ret = g_test_run ();
+
+  ephy_file_helpers_shutdown ();
+
+  return ret;
 }
diff --git a/tests/ephy-migration-test.c b/tests/ephy-migration-test.c
index 06fac5a0c..a09d80361 100644
--- a/tests/ephy-migration-test.c
+++ b/tests/ephy-migration-test.c
@@ -82,6 +82,7 @@ test_do_migration_invalid (void)
 int
 main (int argc, char *argv[])
 {
+  int ret;
   gtk_test_init (&argc, &argv);
 
   ephy_debug_init ();
@@ -98,5 +99,9 @@ main (int argc, char *argv[])
   g_test_add_func ("/lib/ephy-profile-utils/do_migration_invalid",
                    test_do_migration_invalid);
 
-  return g_test_run ();
+  ret = g_test_run ();
+
+  ephy_file_helpers_shutdown ();
+
+  return ret;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]