[Xfce4-commits] <midori:master> Disable unreliable tests unless MIDORI_TEST_UNDEFINED is set

Christian Dywan noreply at xfce.org
Sat Dec 15 20:20:01 CET 2012


Updating branch refs/heads/master
         to f7788bfb1dabd519b2de7457bc2bb62e76c6809e (commit)
       from a38e66fe35f3805d6516fbaad161abaaccde7120 (commit)

commit f7788bfb1dabd519b2de7457bc2bb62e76c6809e
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Dec 15 20:14:16 2012 +0100

    Disable unreliable tests unless MIDORI_TEST_UNDEFINED is set

 tests/download.vala |    5 +++--
 tests/tab.vala      |    4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/download.vala b/tests/download.vala
index 81e23a4..262b969 100644
--- a/tests/download.vala
+++ b/tests/download.vala
@@ -74,7 +74,9 @@ void download_properties () {
     Midori.Download.set_type (download, Midori.DownloadType.OPEN);
     assert (Midori.Download.get_type (download) == Midori.DownloadType.OPEN);
     assert (Midori.Download.get_progress (download) == 0.0);
-    /* FIXME: Hangs in GTK+2, runs in GTK+3
+
+    if (Environment.get_variable ("MIDORI_TEST_UNDEFINED") != "1") return;
+
     try {
         string filename;
         FileUtils.close (FileUtils.open_tmp ("XXXXXX", out filename));
@@ -92,7 +94,6 @@ void download_properties () {
     catch (Error error) {
         GLib.error (error.message);
     }
-    */
 }
 
 void main (string[] args) {
diff --git a/tests/tab.vala b/tests/tab.vala
index c19cf42..5d388af 100644
--- a/tests/tab.vala
+++ b/tests/tab.vala
@@ -120,6 +120,8 @@ void tab_special () {
 }
 
 void tab_http () {
+    if (Environment.get_variable ("MIDORI_TEST_UNDEFINED") != "1") return;
+
     Midori.Test.grab_max_timeout ();
 
     Midori.Test.log_set_fatal_handler_for_icons ();
@@ -135,7 +137,7 @@ void tab_http () {
     var test_address = new Soup.Address ("127.0.0.1", Soup.ADDRESS_ANY_PORT);
     test_address.resolve_sync (null);
     var test_server = new Soup.Server ("interface", test_address, null);
-    string test_url = "http://%s:%u".printf (test_address.get_physical (), test_server.get_port ());
+    string test_url = "http://127.0.0.1:%u".printf (test_server.get_port ());
     test_server.run_async ();
     test_server.add_handler ("/", (server, msg, path, query, client)=>{
         msg.set_status_full (200, "OK");


More information about the Xfce4-commits mailing list