comparison http_resolver_aaaa.t @ 392:c28ecaef065f

Tests: try_run() introduced. This method replaces multiple ad-hoc solutions to grecefully skip tests if nginx startup fails, e.g., due to no support for a particular directive.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 18 Apr 2014 18:36:26 +0400
parents 82db241184e0
children 847ea345becb
comparison
equal deleted inserted replaced
391:915ef26ac6eb 392:c28ecaef065f
66 } 66 }
67 } 67 }
68 68
69 EOF 69 EOF
70 70
71 eval { 71 $t->try_run('no inet6 support')->plan(72);
72 open OLDERR, ">&", \*STDERR; close STDERR;
73 $t->run();
74 open STDERR, ">&", \*OLDERR;
75 };
76 plan(skip_all => 'no inet6 support') if $@;
77 72
78 $t->run_daemon(\&dns_daemon, 8081, $t); 73 $t->run_daemon(\&dns_daemon, 8081, $t);
79 $t->run_daemon(\&dns_daemon, 8082, $t); 74 $t->run_daemon(\&dns_daemon, 8082, $t);
80 75
81 $t->waitforfile($t->testdir . '/8081'); 76 $t->waitforfile($t->testdir . '/8081');
82 $t->waitforfile($t->testdir . '/8082'); 77 $t->waitforfile($t->testdir . '/8082');
83
84 $t->plan(72);
85 78
86 ############################################################################### 79 ###############################################################################
87 80
88 my (@n, $response); 81 my (@n, $response);
89 82