LRN: Fix automake deps to allow -j* builds again
[oweals/gnunet.git] / src / util / test_configuration.c
index 6747c73cb50970272c5d611bc9a552264a368459..365161e34f79eebdeae4637a7114e95518462bc8 100644 (file)
@@ -473,7 +473,12 @@ main (int argc, char *argv[])
       return 1;
     }
   failureCount += testConfig ();
-  failureCount += 2 * testConfigFilenames ();
+  if (failureCount > 0)
+    goto error;
+
+  failureCount = testConfigFilenames ();
+  if (failureCount > 0)
+    goto error;
 
   if (GNUNET_OK != GNUNET_CONFIGURATION_write (cfg, "/tmp/gnunet-test.conf"))
     {
@@ -492,15 +497,22 @@ main (int argc, char *argv[])
       GNUNET_CONFIGURATION_destroy (cfg);
       return 1;
     }
-  if ((GNUNET_OK !=
-       GNUNET_CONFIGURATION_get_value_string (cfg, "TESTING", "WEAKRANDOM",
-                                             &c))
-      || (0 != strcmp (c, "YES")))
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (cfg, "TESTING", "WEAKRANDOM",
+                                            &c))
     {
       GNUNET_break (0);
       GNUNET_CONFIGURATION_destroy (cfg);
       return 1;
     }
+  if (0 != strcmp (c, "YES"))
+    {
+      GNUNET_break (0);
+      GNUNET_free (c);
+      GNUNET_CONFIGURATION_destroy (cfg);
+      return 1;
+    }
+
   GNUNET_free (c);
   GNUNET_CONFIGURATION_destroy (cfg);
 
@@ -530,6 +542,7 @@ main (int argc, char *argv[])
 
   GNUNET_CONFIGURATION_destroy (cfgDefault);
 
+error:
   if (failureCount != 0)
     {
       fprintf (stderr, "Test failed: %u\n", failureCount);