From: Marek VavruĊĦa Date: Thu, 17 Sep 2015 11:35:44 +0000 (+0200) Subject: tests: cleanup X-Git-Tag: v1.0.0-beta1~53^2~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16b8f4e8c3bf59b5faf1d736d3aedfdbbce4115e;p=thirdparty%2Fknot-resolver.git tests: cleanup --- diff --git a/tests/pydnstest/scenario.py b/tests/pydnstest/scenario.py index 3080947ac..083d27178 100644 --- a/tests/pydnstest/scenario.py +++ b/tests/pydnstest/scenario.py @@ -278,7 +278,7 @@ class Step: def play(self, ctx, peeraddr): """ Play one step from a scenario. """ - dprint('=> %d\t%s' % (self.id, self.type)) + dprint('[ STEP %03d ] %s' % (self.id, self.type)) if self.type == 'QUERY': dprint(self.data[0].message.to_text()) return self.__query(ctx, peeraddr) diff --git a/tests/test.h b/tests/test.h index 213f03016..ceb43e0f9 100644 --- a/tests/test.h +++ b/tests/test.h @@ -27,6 +27,9 @@ #include #include +/* Silence clang/GCC warnings when using cmocka 1.0 */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + #include "lib/defines.h" #include #include diff --git a/tests/test_integration.py b/tests/test_integration.py index 7afd7786a..8e6f357e0 100755 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -193,22 +193,12 @@ def setup_env(child_env, config, config_name, j2template): if k == 'query-minimization' and str2bool(v): no_minimize = "false" elif k == 'trust-anchor': - if ((v[0] == '"') and (v[-1] == '"')) or ((v[0] == '\'') and (v[-1] == '\'')): - trust_anchor_str = v[1:-1] - else: - trust_anchor_str = v + trust_anchor_str = v.strip('"\'') elif k == 'val-override-date': - override_date_str = "" - if ((v[0] == '"') and (v[-1] == '"')) or ((v[0] == '\'') and (v[-1] == '\'')): - override_date_str = v[1:-1] - else: - override_date_str = v + override_date_str = v.strip('"\'') write_timestamp_file(child_env["FAKETIME_TIMESTAMP_FILE"], int(override_date_str)) elif k == 'stub-addr': - if ((v[0] == '"') and (v[-1] == '"')) or ((v[0] == '\'') and (v[-1] == '\'')): - stub_addr = v[1:-1] - else: - stub_addr = v + stub_addr = v.strip('"\'') if stub_addr.startswith('127.0.0.') or stub_addr.startswith('::'): selfaddr = stub_addr else: @@ -278,6 +268,8 @@ def play_object(path, binary_name, config_name, j2template, binary_additional_pa server.stop() daemon_proc.terminate() daemon_proc.wait() + if 'VERBOSE' in os.environ: + print('[ LOG ]\n%s' % open('%s/server.log' % TMPDIR).read()) # Do not clear files if the server crashed (for analysis) del_files(TMPDIR)