1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

A few test cases were failing on windows due to mandatory locking. Omit them on that platform. (CVS 2234)

FossilOrigin-Name: 441316f1af076fef42055d6abe524f2a8c5ced63
This commit is contained in:
danielk1977
2005-01-19 03:47:15 +00:00
parent 030530de9b
commit ca6707145d
4 changed files with 42 additions and 30 deletions

View File

@ -15,7 +15,7 @@
# 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
@ -256,25 +256,31 @@ if {$tcl_platform(platform)=="unix" && [file exists ./crashtest]} {
# 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);