From 8da14f0bed0d373ad48feabdb7ea354463e1595f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 28 May 2011 18:59:23 -0400 Subject: [PATCH] Move unit testing over to Build.PL framework (./Build test). --- .gitignore | 1 + Build.PL | 1 + {unit-tests => t}/10.keyserver/10.gnupghome.t | 0 {unit-tests => t}/10.keyserver/20.fetch_fpr.t | 0 {unit-tests => t}/10.keyserver/20.fetch_uid.t | 0 {unit-tests => t}/20.validator/query.t | 0 {unit-tests => t}/30.fingerprints/fpr.t | 0 test-msva | 17 ----------- unit-tests/run-tests.pl | 29 ------------------- 9 files changed, 2 insertions(+), 46 deletions(-) rename {unit-tests => t}/10.keyserver/10.gnupghome.t (100%) rename {unit-tests => t}/10.keyserver/20.fetch_fpr.t (100%) rename {unit-tests => t}/10.keyserver/20.fetch_uid.t (100%) rename {unit-tests => t}/20.validator/query.t (100%) rename {unit-tests => t}/30.fingerprints/fpr.t (100%) delete mode 100755 test-msva delete mode 100644 unit-tests/run-tests.pl 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; -- 2.26.2