From: W. Trevor King Date: Sat, 28 May 2011 22:59:23 +0000 (-0400) Subject: Move unit testing over to Build.PL framework (./Build test). X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8da14f0bed0d373ad48feabdb7ea354463e1595f;p=monkeysphere-validation-agent.git Move unit testing over to Build.PL framework (./Build test). --- diff --git a/.gitignore b/.gitignore index fe04aa5..44ad310 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ MANIFEST.SKIP.bak MYMETA.yml _build/ blib/ +unit* diff --git a/Build.PL b/Build.PL index 496fa3b..3ab13fb 100644 --- a/Build.PL +++ b/Build.PL @@ -37,6 +37,7 @@ my $cm = Module::Build->new script_files => 'script/', doc_files => \%doc_files, install_path => { 'doc' => '/usr/share/doc/msva' }, + recursive_test_files => 1, ); $cm->add_build_element('doc'); $cm->create_build_script; diff --git a/unit-tests/10.keyserver/10.gnupghome.t b/t/10.keyserver/10.gnupghome.t similarity index 100% rename from unit-tests/10.keyserver/10.gnupghome.t rename to t/10.keyserver/10.gnupghome.t diff --git a/unit-tests/10.keyserver/20.fetch_fpr.t b/t/10.keyserver/20.fetch_fpr.t similarity index 100% rename from unit-tests/10.keyserver/20.fetch_fpr.t rename to t/10.keyserver/20.fetch_fpr.t diff --git a/unit-tests/10.keyserver/20.fetch_uid.t b/t/10.keyserver/20.fetch_uid.t similarity index 100% rename from unit-tests/10.keyserver/20.fetch_uid.t rename to t/10.keyserver/20.fetch_uid.t diff --git a/unit-tests/20.validator/query.t b/t/20.validator/query.t similarity index 100% rename from unit-tests/20.validator/query.t rename to t/20.validator/query.t diff --git a/unit-tests/30.fingerprints/fpr.t b/t/30.fingerprints/fpr.t similarity index 100% rename from unit-tests/30.fingerprints/fpr.t rename to t/30.fingerprints/fpr.t diff --git a/test-msva b/test-msva deleted file mode 100755 index 3e244e5..0000000 --- a/test-msva +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# this script exists so that you can launch the msva perl scripts -# directly from your development environment without having to install -# anything. - -# it appears to be necessary because of some weirdness in how -# HTTP::Server::Simple interacts with Net::Server -- otherwise, i -# wouldn't need to shuffle all these files around. - -# Author: Daniel Kahn Gillmor -# Date: 2010-03-11 14:53:07-0500 - -dir=$(dirname "$0") -cmd="$1" -shift -exec perl -wT -I"$dir" "$dir"/"$cmd" "$@" diff --git a/unit-tests/run-tests.pl b/unit-tests/run-tests.pl deleted file mode 100644 index 4c3731c..0000000 --- a/unit-tests/run-tests.pl +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/perl -use strict; - -use TAP::Harness; -use File::Find; -use FindBin; -my $BINDIR; -BEGIN { $BINDIR = $FindBin::Bin; } - -my @dirs = scalar(@ARGV) > 0 ? @ARGV : ($BINDIR); - -my @tests; - -sub wanted { - push (@tests,$File::Find::name) if -f && m/.*\.t$/; -} - -find(\&wanted, @dirs); - -@tests=sort @tests; - -print STDERR "found ",scalar(@tests)," tests\n"; - -my $harness = TAP::Harness->new( { verbosity => 1, - lib => [ $BINDIR.'/..'] }); - -$harness->runtests(@tests); - -1;