X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Funit%2Fmeson.build;h=d83a080a761e7ada30034b333dc8c4ee1f8e5524;hb=421aa3815645b2835c89799e4db91cf35466542b;hp=0240dc96bb14135bb4991dc72beb1e23519c4725;hpb=56621be326497d56db0c4c372ae3cc497018cfcf;p=tinc diff --git a/test/unit/meson.build b/test/unit/meson.build index 0240dc96..d83a080a 100644 --- a/test/unit/meson.build +++ b/test/unit/meson.build @@ -17,9 +17,17 @@ link_tincd = { 'lib': lib_tincd, 'dep': deps_tincd } # 'code': 'test1.c', // or ['test1.c', 'test1_util.c'] # 'mock': ['foo', 'bar'], // list of functions to mock (default: empty) # 'link': link_tinc, // which binary to link with (default: tincd) +# 'fail': true, // whether the test should fail (default: false) # } tests = { + 'random': { + 'code': 'test_random.c', + }, + 'random_noinit': { + 'code': 'test_random_noinit.c', + 'fail': true, + }, 'net': { 'code': 'test_net.c', 'mock': ['execute_script', 'environment_init', 'environment_exit'], @@ -59,11 +67,14 @@ foreach test, data : tests include_directories: inc_conf, build_by_default: false) + must_fail = data.get('fail', false) + test(test, exe, suite: 'unit', timeout: 60, - protocol: 'tap', - env: env) + protocol: must_fail ? 'exitcode' : 'tap', + env: env, + should_fail: must_fail) endforeach