]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
On windows, avoid running those tests in exclusive.test that require the journal...
authordanielk1977 <danielk1977@noemail.net>
Wed, 24 Sep 2008 14:03:43 +0000 (14:03 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Wed, 24 Sep 2008 14:03:43 +0000 (14:03 +0000)
FossilOrigin-Name: 5debf12fa46520946ac5da44c03448fffbc9940c

manifest
manifest.uuid
test/exclusive.test

index 7269c63652820ddc0157bebd5fc321161c9030f0..3dbba4bc66004ad5b53a464cb814aa05ed379de0 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sfile\sfts3_icu.c\sto\sthe\samalgamation.\sBecause\sof\sthe\sway\sheader\sfiles\sare\sincluded\sinto\ssqlite3.c,\sfts3_icu.c\shas\sto\sappear\safter\sall\sthe\sother\sfts3\sand\sicu\sextension\sfiles.\sTicket\s#3398.\s(CVS\s5741)
-D 2008-09-24T09:58:01
+C On\swindows,\savoid\srunning\sthose\stests\sin\sexclusive.test\sthat\srequire\sthe\sjournal\sfile\sto\sbe\sexternally\saccessed\swhile\sSQLite\sis\sholding\sit\sopen.\sThis\sdoesn't\swork\son\swindows.\s(CVS\s5742)
+D 2008-09-24T14:03:43
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in e4ab842f9a64ef61d57093539a8aab76b12810db
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -287,7 +287,7 @@ F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea
 F test/enc2.test 6d91a5286f59add0cfcbb2d0da913b76f2242398
 F test/enc3.test 5c550d59ff31dccdba5d1a02ae11c7047d77c041
 F test/eval.test 020a21a236667bd4c56205d999c9992f1d944cac
-F test/exclusive.test 5390ddf1f90a6d055111c0ebe6311045dd3035e1
+F test/exclusive.test 8d32ccf8eaf0260977dc8406bd70080ca2d7e6f8
 F test/exclusive2.test 7d2b1c0370f1e1dac4a728bd653f2dea5100fcf6
 F test/exec.test e949714dc127eaa5ecc7d723efec1ec27118fdd7
 F test/expr.test 135ed46c049916688171e618c5c14312811618d4
@@ -637,7 +637,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
-P 0fb98c35353d8c0a8d669bbe45fe84e3a5060621
-R 859f2905b67a8bdd67aa2bb089a495b4
+P 0acca5842f83943228d4225b60dc7e8a42bae577
+R 9eb08ed19a8499580c1afb4ad41aa2b7
 U danielk1977
-Z 71842990e6a257d104859b264ad9981c
+Z 7daec82c5a8b96a531bdb9c3bccd5b3b
index 83f667f172a6e6ce9ab406e57451ab8c2f0451f1..bbb10a515e88058e5090aee8dabe1ad2ff6f7708 100644 (file)
@@ -1 +1 @@
-0acca5842f83943228d4225b60dc7e8a42bae577
\ No newline at end of file
+5debf12fa46520946ac5da44c03448fffbc9940c
\ No newline at end of file
index 599a29926c75d3a86eab9a87e463fb9ef6dca8ab..91253d4afc4a46f03c69f1d54b09dc04c7dbe99e 100644 (file)
@@ -12,7 +12,7 @@
 # of these tests is exclusive access mode (i.e. the thing activated by 
 # "PRAGMA locking_mode = EXCLUSIVE").
 #
-# $Id: exclusive.test,v 1.8 2008/04/17 14:16:42 drh Exp $
+# $Id: exclusive.test,v 1.9 2008/09/24 14:03:43 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -257,58 +257,64 @@ db2 close
 # truncates instead of deletes the journal file when committing 
 # a transaction.
 #
-proc filestate {fname} {
-  set exists 0
-  set content 0
-  if {[file exists $fname]} {
-    set exists 1
-    set hdr [hexio_read $fname 0 28]
-    set content \
-      [expr {$hdr!="00000000000000000000000000000000000000000000000000000000"}]
+# These tests are not run on windows because the windows backend
+# opens the journal file for exclusive access, preventing its contents 
+# from being inspected externally.
+#
+if {$tcl_platform(platform) != "windows"} {
+  proc filestate {fname} {
+    set exists 0
+    set content 0
+    if {[file exists $fname]} {
+      set exists 1
+      set hdr [hexio_read $fname 0 28]
+      set content \
+       [expr {$hdr!="00000000000000000000000000000000000000000000000000000000"}]
+    }
+    list $exists $content
   }
-  list $exists $content
+  do_test exclusive-3.0 {
+    filestate test.db-journal
+  } {0 0}
+  do_test exclusive-3.1 {
+    execsql {
+      PRAGMA locking_mode = exclusive;
+      BEGIN;
+      DELETE FROM abc;
+    }
+    filestate test.db-journal
+  } {1 1}
+  do_test exclusive-3.2 {
+    execsql {
+      COMMIT;
+    }
+    filestate test.db-journal
+  } {1 0}
+  do_test exclusive-3.3 {
+    execsql {
+      INSERT INTO abc VALUES('A', 'B', 'C');
+      SELECT * FROM abc;
+    }
+  } {A B C}
+  do_test exclusive-3.4 {
+    execsql {
+      BEGIN;
+      UPDATE abc SET a = 1, b = 2, c = 3;
+      ROLLBACK;
+      SELECT * FROM abc;
+    }
+  } {A B C}
+  do_test exclusive-3.5 {
+    filestate test.db-journal
+  } {1 0}
+  do_test exclusive-3.6 {
+    execsql {
+      PRAGMA locking_mode = normal;
+      SELECT * FROM abc;
+    }
+    filestate test.db-journal
+  } {0 0}
 }
-do_test exclusive-3.0 {
-  filestate test.db-journal
-} {0 0}
-do_test exclusive-3.1 {
-  execsql {
-    PRAGMA locking_mode = exclusive;
-    BEGIN;
-    DELETE FROM abc;
-  }
-  filestate test.db-journal
-} {1 1}
-do_test exclusive-3.2 {
-  execsql {
-    COMMIT;
-  }
-  filestate test.db-journal
-} {1 0}
-do_test exclusive-3.3 {
-  execsql {
-    INSERT INTO abc VALUES('A', 'B', 'C');
-    SELECT * FROM abc;
-  }
-} {A B C}
-do_test exclusive-3.4 {
-  execsql {
-    BEGIN;
-    UPDATE abc SET a = 1, b = 2, c = 3;
-    ROLLBACK;
-    SELECT * FROM abc;
-  }
-} {A B C}
-do_test exclusive-3.5 {
-  filestate test.db-journal
-} {1 0}
-do_test exclusive-3.6 {
-  execsql {
-    PRAGMA locking_mode = normal;
-    SELECT * FROM abc;
-  }
-  filestate test.db-journal
-} {0 0}
 
 #----------------------------------------------------------------------
 # Tests exclusive-4.X - test that rollback works correctly when