From: Rafael Kitover Date: Sun, 25 Mar 2012 20:14:33 +0000 (-0400) Subject: skip dbicdump tests on Win32 due to test fails X-Git-Tag: 0.07018~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-Schema-Loader.git;a=commitdiff_plain;h=f21f7e97cf60c1a60d8309c9a4ec79530c95b9c5 skip dbicdump tests on Win32 due to test fails t/23dumpmore.t and t/26dump_use_moose.t fail on Win32 with some types of refs and characters in -o params to dbicdump because of quoting issues. There is currently no module like String::ShellQuote for Win32, haarg is releasing Win32::ShellQuote soon, and then I will reenable these tests. Also the fucking pigs completely fucked up my windows computer and when I was trying to run some tests with dbicdump I got constant perl hangs, so I cannot debug this right now and I disabled ALL dbicdump tests on Win32. I removed the reference to the FUCKING_PIGS environment variable because, at least, the behavior of the tests is now at least consistent with that of other machines, or was, except for the perl hangs I'm getting now, and because I'm making this skip for all dbicdump tests, not just those with refs so it is in the same part of the code, so might as well. --- diff --git a/Changes b/Changes index 65bee7c..e7cd30d 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,6 @@ Revision history for Perl extension DBIx::Class::Schema::Loader + - skip dbicdump tests on Win32 due to test fails (RT#75732) - fix undefined warnings for DBDs without schemas - work around ORA-24345 from $dbh->column_info - fix spelling mistake in Base POD (RT#74796) diff --git a/t/lib/dbixcsl_dumper_tests.pm b/t/lib/dbixcsl_dumper_tests.pm index 4da9564..9e71ff8 100644 --- a/t/lib/dbixcsl_dumper_tests.pm +++ b/t/lib/dbixcsl_dumper_tests.pm @@ -47,12 +47,8 @@ sub dump_test { $tdata{options}{use_namespaces} ||= 0; SKIP: for my $dumper (\&_dump_directly, \&_dump_dbicdump) { - skip 'fucking pigs broke my Win32 perl', 1, - if $dumper == \&_dump_dbicdump - && $^O eq 'MSWin32' - && $ENV{FUCKING_PIGS} - && ( (any { ref $_ } values %{ $tdata{options} }) - || any { ref $_ } _get_connect_info(\%tdata)); + skip 'skipping dbicdump tests on Win32', 1, + if $dumper == \&_dump_dbicdump && $^O eq 'MSWin32'; _test_dumps(\%tdata, $dumper->(%tdata)); } @@ -96,7 +92,14 @@ sub _dump_dbicdump { while (my ($opt, $val) = each(%{ $tdata{options} })) { $val = dumper_squashed $val if ref $val; - push @cmd, '-o', "$opt=$val"; + + my $param = "$opt=$val"; + + if ($^O eq 'MSWin32') { + $param = q{"} . $param . q{"}; # that's not nearly enough... + } + + push @cmd, '-o', $param; } my @connect_info = _get_connect_info(\%tdata);