From: Tomas Krizek Date: Thu, 1 Oct 2020 13:04:48 +0000 (+0200) Subject: meson: mark skipped config tests as skipped X-Git-Tag: v5.2.0~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4957b2febf4c0e4eeb1983c6e5f2c648d88ec173;p=thirdparty%2Fknot-resolver.git meson: mark skipped config tests as skipped Using exit code 77 lets meson know to classify tests as skipped instead of failed or passed. Works since meson 0.37. https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors --- diff --git a/daemon/lua/trust_anchors.test/bootstrap.test.lua b/daemon/lua/trust_anchors.test/bootstrap.test.lua index fa113c4e5..56c5addef 100644 --- a/daemon/lua/trust_anchors.test/bootstrap.test.lua +++ b/daemon/lua/trust_anchors.test/bootstrap.test.lua @@ -4,8 +4,8 @@ modules.load('ta_update') -- check prerequisites local has_http = pcall(require, 'kres_modules.http') and pcall(require, 'http.request') if not has_http then - pass('skipping bootstrap tests because http module is not not installed') - done() + -- skipping bootstrap tests because http module is not not installed + os.exit(77) end local cqueues = require("cqueues") diff --git a/modules/daf/daf_http.test.lua b/modules/daf/daf_http.test.lua index bdd486e14..fc1b50eb0 100644 --- a/modules/daf/daf_http.test.lua +++ b/modules/daf/daf_http.test.lua @@ -2,8 +2,8 @@ -- check prerequisites local has_http = pcall(require, 'kres_modules.http') and pcall(require, 'http.request') if not has_http then - pass('skipping daf module test because http its not installed') - done() + -- skipping daf module test because http its not installed + os.exit(77) else local request = require('http.request') diff --git a/modules/http/http.test.lua b/modules/http/http.test.lua index 393114064..4d1e0fecc 100644 --- a/modules/http/http.test.lua +++ b/modules/http/http.test.lua @@ -2,8 +2,8 @@ -- check prerequisites local has_http = pcall(require, 'kres_modules.http') and pcall(require, 'http.request') if not has_http then - pass('skipping http module test because its not installed') - done() + -- skipping http module test because its not installed + os.exit(77) else local request = require('http.request') diff --git a/modules/http/http_doh.test.lua b/modules/http/http_doh.test.lua index 97bc63a89..cfe31d373 100644 --- a/modules/http/http_doh.test.lua +++ b/modules/http/http_doh.test.lua @@ -75,8 +75,8 @@ end -- check prerequisites local has_http = pcall(require, 'kres_modules.http') and pcall(require, 'http.request') if not has_http then - pass('skipping http module test because its not installed') - done() + -- skipping http module test because its not installed + os.exit(77) else policy.add(policy.suffix(policy.DROP, policy.todnames({'servfail.test.'}))) policy.add(policy.suffix(policy.DENY, policy.todnames({'nxdomain.test.'}))) diff --git a/modules/http/test_tls/tls.test.lua b/modules/http/test_tls/tls.test.lua index 459452606..481d7b87f 100644 --- a/modules/http/test_tls/tls.test.lua +++ b/modules/http/test_tls/tls.test.lua @@ -2,8 +2,8 @@ -- check prerequisites local has_http = pcall(require, 'kres_modules.http') and pcall(require, 'http.request') if not has_http then - pass('skipping http module test because its not installed') - done() + -- skipping http module test because its not installed + os.exit(77) else local request = require('http.request') local openssl_ctx = require('openssl.ssl.context') diff --git a/tests/config/worker.test.lua b/tests/config/worker.test.lua index 6133d6c8c..756bb5fb1 100644 --- a/tests/config/worker.test.lua +++ b/tests/config/worker.test.lua @@ -1,8 +1,8 @@ -- SPDX-License-Identifier: GPL-3.0-or-later -- check prerequisites if not worker.bg_worker then - pass('skipping worker test because it doesnt support background worker') - done() + -- skipping worker test because it doesnt support background worker + os.exit(77) else -- import primitives for synchronisation local monotime = require('cqueues').monotime