tests/lib/conds/utils.cpp: condMain(): unset `BABELTRACE_EXEC_ON_ABORT`
[babeltrace.git] / tests / lib / conds / utils.cpp
index 28f0ba40748eecf0000e2811817eea603ac08546..9bf5450fe5bf56ab461c54e80ccab1439edc5b47 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (C) 2020 Philippe Proulx <pproulx@efficios.com>
  */
 
+#include <glib.h>
 #include <stdlib.h>
 #include <string.h>
 
@@ -57,6 +58,14 @@ void condMain(const int argc, const char ** const argv, const CondTriggers condT
     if (strcmp(argv[1], "list") == 0) {
         listCondTriggers(condTriggers);
     } else if (strcmp(argv[1], "run") == 0) {
+        /*
+         * It's expected that calling `*condTriggers[index]` below
+         * aborts (calls bt_common_abort()). In this testing context, we
+         * don't want any custom abortion command to run.
+         */
+        g_unsetenv("BABELTRACE_EXEC_ON_ABORT");
+
+        /* Call the trigger */
         BT_ASSERT(argc >= 3);
 
         const auto index = atoi(argv[2]);
This page took 0.02308 seconds and 4 git commands to generate.