diff options
author | Simon McVittie <smcv@debian.org> | 2015-11-30 17:33:00 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2015-11-30 18:26:22 +0000 |
commit | cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35 (patch) | |
tree | 6a33fd51436d66178fdfab689a8c6076cefa1c54 /t/relativity.t | |
parent | 78a47d44c7c7d798c0a16c17954caef57e4c192e (diff) | |
download | ikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar ikiwiki-cdfb4ab1a3c60bf699b8d77618ec9bdf526cdb35.tar.gz |
Run autopkgtest tests using autodep8 and the pkg-perl team's infrastructure
Diffstat (limited to 't/relativity.t')
-rwxr-xr-x | t/relativity.t | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/t/relativity.t b/t/relativity.t index a1f3ad830..c67c8ba17 100755 --- a/t/relativity.t +++ b/t/relativity.t @@ -16,6 +16,20 @@ use Errno qw(ENOENT); # Black-box (ish) test for relative linking between CGI and static content +my $installed = $ENV{INSTALLED_TESTS}; + +my @command; +if ($installed) { + @command = qw(ikiwiki); +} +else { + ok(! system("make -s ikiwiki.out")); + @command = qw(perl -I. ./ikiwiki.out + --underlaydir=underlays/basewiki + --set underlaydirbase=underlays + --templatedir=templates); +} + sub parse_cgi_content { my $content = shift; my %bits; @@ -53,7 +67,6 @@ sub write_setup_file { wikiname: this is the name of my wiki srcdir: t/tmp/in destdir: t/tmp/out -templatedir: templates $urlline cgiurl: $args{cgiurl} $w3mmodeline @@ -71,7 +84,7 @@ EOF sub thoroughly_rebuild { ok(unlink("t/tmp/ikiwiki.cgi") || $!{ENOENT}); - ok(! system("./ikiwiki.out --setup t/tmp/test.setup --rebuild --wrappers")); + ok(! system(@command, qw(--setup t/tmp/test.setup --rebuild --wrappers))); } sub check_cgi_mode_bits { @@ -131,7 +144,6 @@ sub run_cgi { } sub test_startup { - ok(! system("make -s ikiwiki.out")); ok(! system("rm -rf t/tmp")); ok(! system("mkdir t/tmp")); |