Index: test/ioerr.test ================================================================== --- test/ioerr.test +++ test/ioerr.test @@ -13,11 +13,11 @@ # such as writes failing because the disk is full. # # The tests in this file use special facilities that are only # available in the SQLite test fixture. # -# $Id: ioerr.test,v 1.15 2005/01/16 11:07:07 danielk1977 Exp $ +# $Id: ioerr.test,v 1.16 2005/01/19 03:47:16 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Usage: do_ioerr_test @@ -254,29 +254,35 @@ } } # Test handling of IO errors that occur while rolling back hot journal # files. -do_ioerr_test 7 -tclprep { - db close - sqlite3 db2 test2.db - db2 eval { - PRAGMA synchronous = 0; - CREATE TABLE t1(a, b); - INSERT INTO t1 VALUES(1, 2); - BEGIN; - INSERT INTO t1 VALUES(3, 4); - } - file copy -force test2.db test.db - file copy -force test2.db-journal test.db-journal - db2 close -} -tclbody { - sqlite3 db test.db - db eval { - SELECT * FROM t1; - } -} -exclude 1 +# +# These tests can't be run on windows because the windows version of +# SQLite holds a mandatory exclusive lock on journal files it has open. +# +if {$tcl_platform(platform)!="windows"} { + do_ioerr_test 7 -tclprep { + db close + sqlite3 db2 test2.db + db2 eval { + PRAGMA synchronous = 0; + CREATE TABLE t1(a, b); + INSERT INTO t1 VALUES(1, 2); + BEGIN; + INSERT INTO t1 VALUES(3, 4); + } + file copy -force test2.db test.db + file copy -force test2.db-journal test.db-journal + db2 close + } -tclbody { + sqlite3 db test.db + db eval { + SELECT * FROM t1; + } + } -exclude 1 +} # do_ioerr_test 15 -sqlprep { # CREATE TABLE abc(a UNIQUE, b, c); # INSERT INTO abc VALUES(1, 2, 3); # } -sqlbody { Index: test/pager.test ================================================================== --- test/pager.test +++ test/pager.test @@ -9,11 +9,11 @@ # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this script is page cache subsystem. # -# $Id: pager.test,v 1.20 2005/01/17 07:53:44 danielk1977 Exp $ +# $Id: pager.test,v 1.21 2005/01/19 03:47:16 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -443,10 +443,15 @@ COMMIT; } } {} } +# The following tests cover rolling back hot journal files. +# They can't be run on windows because the windows version of +# SQLite holds a mandatory exclusive lock on journal files it has open. +# +if {$tcl_platform(platform)!="windows"} { do_test pager-6.1 { file delete -force test2.db file delete -force test2.db-journal sqlite3 db2 test2.db execsql { @@ -512,9 +517,10 @@ } {{CREATE TABLE abc(a, b, c)}} do_test pager-6.4 { db2 close } {} +} finish_test