From: Rafael Kitover Date: Tue, 19 Jul 2011 17:01:20 +0000 (-0400) Subject: fix popups during tests on Win32 (hopefully) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e6983054057f1eeb16bbf6fe5032313f1769640f;p=dbsrgits%2FDBIx-Class-Historic.git fix popups during tests on Win32 (hopefully) A tester reports that t/73oracle_hq.t causes an error popup on Win32. This test was checking for DBD::Oracle (and thereby trying to load it) before checking for the DBICTEST_ORA_DSN environment variables. This commit moves the check for necessary environment variables for the t/73oracle.t and t/73oracle_hq.t test files to before the module requirements tests, thereby not trying to load DBD::Oracle, and causing an error popup. --- diff --git a/t/73oracle.t b/t/73oracle.t index 6e1026e..8ac87ee 100644 --- a/t/73oracle.t +++ b/t/73oracle.t @@ -11,13 +11,6 @@ use lib qw(t/lib); use DBICTest; use DBIC::SqlMakerTest; -plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle') - unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle'); - -$ENV{NLS_SORT} = "BINARY"; -$ENV{NLS_COMP} = "BINARY"; -$ENV{NLS_LANG} = "AMERICAN"; - my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_ORA_${_}" } qw/DSN USER PASS/}; # optional: @@ -26,6 +19,13 @@ my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_ORA_EXTRAUSER_${_}" } qw/DSN U plan skip_all => 'Set $ENV{DBICTEST_ORA_DSN}, _USER and _PASS to run this test.' unless ($dsn && $user && $pass); +plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle') + unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle'); + +$ENV{NLS_SORT} = "BINARY"; +$ENV{NLS_COMP} = "BINARY"; +$ENV{NLS_LANG} = "AMERICAN"; + { package # hide from PAUSE DBICTest::Schema::ArtistFQN; diff --git a/t/73oracle_hq.t b/t/73oracle_hq.t index d9ef26b..af526d9 100644 --- a/t/73oracle_hq.t +++ b/t/73oracle_hq.t @@ -15,14 +15,14 @@ $ENV{NLS_SORT} = "BINARY"; $ENV{NLS_COMP} = "BINARY"; $ENV{NLS_LANG} = "AMERICAN"; -plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_oracle') - unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_oracle'); - my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_ORA_${_}" } qw/DSN USER PASS/}; plan skip_all => 'Set $ENV{DBICTEST_ORA_DSN}, _USER and _PASS to run this test.' unless ($dsn && $user && $pass); +plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_oracle') + unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_oracle'); + use DBICTest::Schema::Artist; BEGIN { DBICTest::Schema::Artist->add_column('parentid');