Subject: | Tests fail when run in parallel |
Attached patch to allow tests to be run in parallel.
c:\strawberry\cpan\build\ORLite-Migrate-1.10-KN3rrH>prove -j4
t\01_compile.t .. ok
t\02_main.t ..... ok
===( 9;0 1/4 0/?
)==============================================Migratio
n patch migrate-1.pl failed, database in unknown state at (eval 20) line
5.
BEGIN failed--compilation aborted at (eval 20) line 10.
# Looks like you planned 4 tests but ran 1.
# Looks like your test exited with 25 just after 1.
t\03_trivial.t .. Dubious, test returned 25 (wstat 6400, 0x1900)
Failed 3/4 subtests
t\04_class.t .... ok
Test Summary Report
-------------------
t\03_trivial.t (Wstat: 6400 Tests: 1 Failed: 0)
Non-zero exit status: 25
Parse errors: Bad plan. You planned 4 tests but ran 1.
Files=4, Tests=13, 1 wallclock secs ( 0.05 usr + 0.06 sys = 0.11 CPU)
Result: FAIL
Subject: | Test.pm.patch |
--- t\lib\Test.pm.orig Sat Nov 17 09:53:54 2012
+++ t\lib\Test.pm Sat Nov 17 09:48:58 2012
@@ -29,7 +29,7 @@
}
sub test_db {
- my $file = catfile( @_ ? @_ : 't', 'sqlite.db' );
+ my $file = catfile( @_ ? @_ : 't', "sqlite.$$.db" );
unlink $file if -f $file;
$to_delete{$file} = 1;
return $file;