comparison _common.pm @ 8:a58a62e9d695

Tests: don't cleanup temp directories if LEAVE set in the env.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 10 Sep 2008 17:36:14 +0400
parents 9eb509695651
children d19146b30334
comparison
equal deleted inserted replaced
7:9eb509695651 8:a58a62e9d695
29 # Create temp directory and run nginx instance. 29 # Create temp directory and run nginx instance.
30 30
31 sub start_nginx { 31 sub start_nginx {
32 my ($conf) = @_; 32 my ($conf) = @_;
33 33
34 $testdir = tempdir('nginx-test-XXXXXXXXXX', TMPDIR => 1, CLEANUP => 1) 34 $testdir = tempdir('nginx-test-XXXXXXXXXX', TMPDIR => 1,
35 CLEANUP => not $ENV{LEAVE})
35 or die "Can't create temp directory: $!\n"; 36 or die "Can't create temp directory: $!\n";
36 37
37 system("cat $conf | sed 's!%%TESTDIR%%!$testdir!g' " 38 system("cat $conf | sed 's!%%TESTDIR%%!$testdir!g' "
38 . "> $testdir/nginx.conf"); 39 . "> $testdir/nginx.conf");
39 40