Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tried to use Module::Install::PRIVATE to extend test target

but it doensn't works now. hmm.
  • Loading branch information...
commit ba565538b6bdc9e8501f8393b461ccb933f59f2c 1 parent fe31456
@dann authored
View
7 Makefile.PL
@@ -1,3 +1,4 @@
+#use lib 'privinc';
use inc::Module::Install;
BEGIN
@@ -11,9 +12,12 @@ BEGIN
no strict 'refs';
*HAVE_MP = $@ ? sub { 0 } : sub { 1 };
}
+
}
+
if (HAVE_MP) {
+ #include 'Module/Install/PRIVATE/Angelos.pm';
require Apache::TestMM;
Apache::TestMM->import(qw(clean test));
}
@@ -79,8 +83,8 @@ requires 'FormValidator::Simple';
#requires 'HTML::Template::Pro';
if (HAVE_MP) {
- require Cwd;
Apache::TestMM::filter_args();
+ #Apache::TestMM::generate_script('t/integration/modperl/TEST');
Apache::TestMM::generate_script('t/TEST');
tests('t/integration/modperl/*.t t/performance/020_modperl/*.t');
} else {
@@ -104,3 +108,4 @@ install_script 'bin/angelos';
use_test_base;
auto_include;
WriteAll;
+
View
0  t/TEST.PL → TEST.PL
File renamed without changes
View
81 privinc/Module/Install/PRIVATE/Angelos.pm
@@ -0,0 +1,81 @@
+#line 1
+use strict;
+use warnings;
+
+package Module::Install::PRIVATE::Angelos;
+use base qw/Module::Install::Base/;
+
+our $VERSION = '0.01';
+
+package MY;
+use Config;
+use Apache::TestConfig ();
+use File::Spec;
+
+sub test {
+ my $self = shift;
+ my $env = Apache::TestConfig->passenv_makestr();
+
+ my $tests = "TEST_FILES =\n";
+
+ if (ref $self && exists $self->{'test'}) {
+ $tests = 'TEST_FILES = ' . $self->{'test'}->{'TESTS'} . "\n";
+ }
+
+ my $preamble = Apache::TestConfig::WIN32 ? "" : <<EOF;
+PASSENV = $env
+EOF
+
+ my $cover;
+
+ if (eval { require Devel::Cover }) {
+ my $atdir = File::Spec->catfile($ENV{HOME}, '.apache-test');
+
+ my $cover_exec = Apache::TestConfig::which("cover");
+
+ my @cover = ("", "testcover :", );
+ push @cover, "\t-\@$cover_exec -delete" if $cover_exec;
+ push @cover, "\t-HARNESS_PERL_SWITCHES=-MDevel::Cover=+inc,$atdir \\",
+ "\tAPACHE_TEST_EXTRA_ARGS=-one-process \$(MAKE) test";
+ push @cover, "\t-\@$cover_exec" if $cover_exec;
+ $cover = join "\n", @cover, "";
+ }
+ else {
+
+ $cover = <<'EOF';
+
+testcover :
+ @echo "Cannot run testcover action unless Devel::Cover is installed"
+ @echo "Don't forget to rebuild your Makefile after installing Devel::Cover"
+EOF
+ }
+
+ return $preamble . $tests . <<'EOF' . $cover;
+TEST_VERBOSE = 0
+
+test_clean :
+ $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
+ t/integration/modperl/TEST $(APACHE_TEST_EXTRA_ARGS) -clean
+
+run_tests :
+ $(PASSENV) \
+ $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
+ t/integration/modperl/TEST $(APACHE_TEST_EXTRA_ARGS) -bugreport -verbose=$(TEST_VERBOSE) $(TEST_FILES)
+
+test :: pure_all test_clean run_tests
+
+test_config :
+ $(PASSENV) \
+ $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \
+ t/integration/modperl/TEST $(APACHE_TEST_EXTRA_ARGS) -conf
+
+cmodules: test_config
+ cd c-modules && $(MAKE) all
+
+cmodules_clean: test_config
+ cd c-modules && $(MAKE) clean
+EOF
+
+}
+
+1;
View
2  t/00_load_all.t
@@ -9,7 +9,7 @@ use Module::Pluggable::Object;
my $finder = Module::Pluggable::Object->new( search_path => ['Angelos'], );
foreach my $class (
- grep !/\.ToDo|Angelos::Engine::ModPerl|Angelos::Component/,
+ grep !/\.ToDo|Angelos::Engine::ModPerl|Angelos::Component|HTPro|JobQueue/,
sort do { local @INC = ('lib'); $finder->plugins }
)
{
View
12 t/TEST
@@ -1,12 +0,0 @@
-#!/usr/bin/perl
-# WARNING: this file is generated, do not edit
-# generated on Sun Jan 11 05:05:45 2009
-# 01: /usr/lib/perl5/Apache/TestConfig.pm:953
-# 02: /usr/lib/perl5/Apache/TestConfig.pm:1043
-# 03: /usr/lib/perl5/Apache/TestMM.pm:141
-# 04: Makefile.PL:84
-
-BEGIN { eval { require blib && blib->import; } }
-use blib;
-use Angelos::Test::Benchmark::ModPerl::TestRunPerl;
-Angelos::Test::Benchmark::ModPerl::TestRunPerl->new->run(@ARGV);
View
6 tools/debug_simple.pl
@@ -1,9 +1,9 @@
#!/usr/bin/env perl
use strict;
use warnings;
-use lib 't/lib';
+use lib 'lib', 't/lib', 't/TestApp/lib';
use Test::TCP;
-use TestApp::Web;
+use TestApp;
use HTTP::Engine;
use LWP::UserAgent;
use Carp::Always;
@@ -20,7 +20,7 @@
},
server => sub {
my $port = shift;
- my $engine = TestApp::Web->new(
+ my $engine = TestApp->new(
server => $module,
port => $port,
);
View
21 tools/profile_he.pl
@@ -1,21 +0,0 @@
-use strict;
-use warnings;
-use Test::TCP;
-use HTTP::Engine;
-use LWP::UserAgent;
-use Mouse;
-use HTTP::Engine::Response;
-
-my $port = 3000;
-
-HTTP::Engine->new(
- interface => {
- module => 'ServerSimple',
- args => { port => $port, },
- request_handler => sub {
- my $req = shift;
- HTTP::Engine::Response->new( status => 200, body => 'ok' );
- },
- },
-)->run;
-
Please sign in to comment.
Something went wrong with that request. Please try again.