tests: return the proper TAP exit code
[babeltrace.git] / tests / ctf-writer / ctf_writer.c
index fe811960e90d6c2bcc59c31dd2eff639b465e00a..cbb0353a9a9f6961ee189928f9e77b19f938a9d8 100644 (file)
 #include <float.h>
 #include "common.h"
 
+#ifdef __FreeBSD__
+/* Required for WIFEXITED and WEXITSTATUS */
+#include <sys/wait.h>
+#endif
+
 #define METADATA_LINE_SIZE 512
 #define SEQUENCE_TEST_LENGTH 10
 #define ARRAY_TEST_LENGTH 5
@@ -97,7 +102,7 @@ void validate_trace(char *parser_path, char *trace_path)
 {
        int ret = 0;
        gint exit_status;
-       char *argv[] = {parser_path, trace_path, "-o", "dummy", NULL};
+       const char *argv[] = {parser_path, trace_path, "-o", "dummy", NULL};
 
        if (!parser_path || !trace_path) {
                ret = -1;
@@ -105,7 +110,7 @@ void validate_trace(char *parser_path, char *trace_path)
        }
 
        if (!g_spawn_sync(NULL,
-                       argv,
+                       (gchar **) argv,
                        NULL,
                        G_SPAWN_STDOUT_TO_DEV_NULL,
                        NULL,
@@ -659,11 +664,11 @@ void append_complex_event(struct bt_ctf_stream_class *stream_class,
                "bt_ctf_event_class_set_log_level succeeds with a valid log level");
        ok(bt_ctf_event_class_get_log_level(event_class) == BT_CTF_EVENT_CLASS_LOG_LEVEL_INFO,
                "bt_ctf_event_class_get_log_level returns the expected log level");
-       ok(bt_ctf_event_class_set_emf_uri(NULL, "http://diamon.org/babeltrace/"),
+       ok(bt_ctf_event_class_set_emf_uri(NULL, "https://babeltrace.org/"),
                "bt_ctf_event_class_set_emf_uri handles a NULL event class correctly");
-       ok(!bt_ctf_event_class_set_emf_uri(event_class, "http://diamon.org/babeltrace/"),
+       ok(!bt_ctf_event_class_set_emf_uri(event_class, "https://babeltrace.org/"),
                "bt_ctf_event_class_set_emf_uri succeeds with a valid EMF URI");
-       ok(strcmp(bt_ctf_event_class_get_emf_uri(event_class), "http://diamon.org/babeltrace/") == 0,
+       ok(strcmp(bt_ctf_event_class_get_emf_uri(event_class), "https://babeltrace.org/") == 0,
                "bt_ctf_event_class_get_emf_uri returns the expected EMF URI");
        ok(!bt_ctf_event_class_set_emf_uri(event_class, NULL),
                "bt_ctf_event_class_set_emf_uri succeeds with NULL (to reset)");
@@ -836,7 +841,7 @@ void append_complex_event(struct bt_ctf_stream_class *stream_class,
 }
 
 static
-void type_field_tests()
+void type_field_tests(void)
 {
        struct bt_ctf_field *uint_12;
        struct bt_ctf_field *int_16;
@@ -2073,5 +2078,5 @@ int main(int argc, char **argv)
        g_free(trace_path);
        g_free(metadata_path);
 
-       return 0;
+       return exit_status();
 }
This page took 0.025122 seconds and 4 git commands to generate.