diff options
author | Luca BRUNO <luca.bruno@coreos.com> | 2021-12-10 11:29:29 +0000 |
---|---|---|
committer | Luca BRUNO <luca.bruno@coreos.com> | 2021-12-10 11:33:35 +0000 |
commit | f44eaf7e8c3686d6ab8982650f31fdb03d2a1ecb (patch) | |
tree | 4593d8164fb87e82806229376de49c7f223fe90e | |
parent | b56786c41590d2c3f4bc285b1f0ea3cbe3f882c3 (diff) | |
download | ostree-f44eaf7e8c3686d6ab8982650f31fdb03d2a1ecb.tar.gz |
tests: assert mandatory values are present
This adds a couple of string assertions to make sure that
the test run is sane.
-rw-r--r-- | tests/libostreetest.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/libostreetest.c b/tests/libostreetest.c index b82b27c3..d5671a1e 100644 --- a/tests/libostreetest.c +++ b/tests/libostreetest.c @@ -31,12 +31,14 @@ gboolean ot_test_run_libtest (const char *cmd, GError **error) { const char *srcdir = g_getenv ("G_TEST_SRCDIR"); - g_autoptr(GPtrArray) argv = g_ptr_array_new (); - g_autoptr(GString) cmdstr = g_string_new (""); + g_assert (srcdir != NULL); + g_assert (cmd != NULL); + g_autoptr(GPtrArray) argv = g_ptr_array_new (); g_ptr_array_add (argv, "bash"); g_ptr_array_add (argv, "-c"); + g_autoptr(GString) cmdstr = g_string_new (""); g_string_append (cmdstr, "set -xeuo pipefail; . "); g_string_append (cmdstr, srcdir); g_string_append (cmdstr, "/tests/libtest.sh; "); |