]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add further tests to ota5.test. Add "ota.test", for running all ota tests.
authordan <dan@noemail.net>
Fri, 19 Sep 2014 18:08:39 +0000 (18:08 +0000)
committerdan <dan@noemail.net>
Fri, 19 Sep 2014 18:08:39 +0000 (18:08 +0000)
FossilOrigin-Name: 95ffdaa542df1c28fac97422e5a4b2c5cb81d50a

ext/ota/ota1.test
ext/ota/ota2.test
ext/ota/ota3.test
ext/ota/ota4.test
ext/ota/ota5.test
manifest
manifest.uuid
test/ota.test [new file with mode: 0644]
test/permutations.test

index 60cc4fc30eb5132005ba431a6db247131558830a..c55ec6ee3ba4099b62b140307c822b96fffd74e4 100644 (file)
@@ -10,7 +10,9 @@
 #***********************************************************************
 #
 
-set testdir [file join [file dirname $argv0] .. .. test]
+if {![info exists testdir]} {
+  set testdir [file join [file dirname [info script]] .. .. test]
+}
 source $testdir/tester.tcl
 set ::testprefix ota1
 
index 6ce6b0852ff27be012441a8b0c1eadee43ec14a6..8830f7461b6cf0015c1ed609e267d318e75bb542 100644 (file)
 #***********************************************************************
 #
 
-set testdir [file join [file dirname $argv0] .. .. test]
+if {![info exists testdir]} {
+  set testdir [file join [file dirname [info script]] .. .. test]
+}
 source $testdir/tester.tcl
 set ::testprefix ota2
 
-forcedelete test.db-oal test.db-bak
+forcedelete {*}[glob -nocomplain test.db?*]
 
 do_execsql_test 1.0 {
   CREATE TABLE t1(a, b);
index dcf8f817aaa0116932fb57b412a32425ccb0aa46..09d1bab083ef87a7f571bcd6d7827b31b54ee172 100644 (file)
@@ -10,7 +10,9 @@
 #***********************************************************************
 #
 
-set testdir [file join [file dirname $argv0] .. .. test]
+if {![info exists testdir]} {
+  set testdir [file join [file dirname [info script]] .. .. test]
+}
 source $testdir/tester.tcl
 set ::testprefix ota3
 
index 98bb9330e3a7dc1659bfa07d5c26752b741113e4..b14225dc528d41419eb5200eb0969c2a044915e1 100644 (file)
@@ -12,7 +12,9 @@
 # Test some properties of the pager_ota_mode and ota_mode pragmas.
 #
 
-set testdir [file join [file dirname $argv0] .. .. test]
+if {![info exists testdir]} {
+  set testdir [file join [file dirname [info script]] .. .. test]
+}
 source $testdir/tester.tcl
 set ::testprefix ota4
 
index 4f85c22b94574af565160a3c1babada23a23d733..8b62eb0f66a60e5c20d7f1a51f219ca6d75f981f 100644 (file)
@@ -12,7 +12,9 @@
 # Test some properties of the pager_ota_mode and ota_mode pragmas.
 #
 
-set testdir [file join [file dirname $argv0] .. .. test]
+if {![info exists testdir]} {
+  set testdir [file join [file dirname [info script]] .. .. test]
+}
 source $testdir/tester.tcl
 set ::testprefix ota5
 
@@ -235,6 +237,91 @@ foreach {tn idx} {
 
 #-------------------------------------------------------------------------
 #
+reset_db
+do_execsql_test 2.0 {
+  CREATE TABLE t1(a INTEGER PRIMARY KEY, b, c, d, e);
+  INSERT INTO t1 VALUES(-750250,'fyetckfaagjkzqjx',-185831,X'FEAD',444258.29);
+  INSERT INTO t1 VALUES(649081,NULL,X'7DF25BF78778',-342324.63,'akvspktocwozo');
+  INSERT INTO t1 VALUES(-133045,-44822.31,X'',287935,NULL);
+  INSERT INTO t1 VALUES(202132,NULL,X'5399','cujsjtspryqeyovcdpz','m');
+  INSERT INTO t1 VALUES(302910,NULL,'dvdhivtfkaedzhdcnn',-717113.41,688487);
+  INSERT INTO t1 VALUES(-582327,X'7A267A',X'7E6B3CFE5CB9','zacuzilrok',-196478);
+  INSERT INTO t1 VALUES(-190462,X'D1A087E7D68D9578','lsmleti',NULL,-928094);
+  INSERT INTO t1 VALUES(-467665,176344.57,-536684.23,828876.22,X'903E');
+  INSERT INTO t1 VALUES(-629138,632630.29,X'28D6',-774501,X'819BBBFC65');
+  INSERT INTO t1 VALUES(-828110,-54379.24,-881121.44,X'',X'8D5A894F0D');
+
+  CREATE TABLE t2(a PRIMARY KEY, b, c, d, e) WITHOUT ROWID;
+  INSERT INTO t2 VALUES(-65174,X'AC1DBFFE27310F',-194471.08,347988,X'84041BA6F9BDDE86A8');
+  INSERT INTO t2 VALUES('bzbpi',-952693.69,811628.25,NULL,-817434);
+  INSERT INTO t2 VALUES(-643830,NULL,'n',NULL,'dio');
+  INSERT INTO t2 VALUES('rovoenxxj',NULL,'owupbtdcoxxnvg',-119676,X'55431DFA');
+  INSERT INTO t2 VALUES(899770,'jlygdl',X'DBCA4D1A',NULL,-631773);
+  INSERT INTO t2 VALUES(334698.80,NULL,-697585.58,-89277,-817352);
+  INSERT INTO t2 VALUES(X'1A9EB7547A4AAF38','aiprdhkpzdz','anw','szvjbwdvzucybpwwqjt',X'53');
+  INSERT INTO t2 VALUES(713220,NULL,'hfcqhqzjuqplvkum',X'20B076075649DE','fthgpvqdyy');
+  INSERT INTO t2 VALUES(763908,NULL,'xgslzcpvwfknbr',X'75',X'668146');
+  INSERT INTO t2 VALUES(X'E1BA2B6BA27278','wjbpd',NULL,139341,-290086.15);
+}
+db close
+
+set cksum [generate_ota_db test.db ota.db {
+INSERT INTO t2 VALUES(222916.23,'idh',X'472C517405',X'E3',X'7C4F31824669');
+INSERT INTO t2 VALUES('xcndjwafcoxwxizoktd',-319567.21,NULL,-720906.43,-577170);
+INSERT INTO t2 VALUES(376369.99,-536058,'yoaiurfqupdscwc',X'29EC8A2542EC3953E9',-740485.22);
+INSERT INTO t2 VALUES(X'0EFB4DC50693',-175590.83,X'1779E253CAB5B1789E',X'BC6903',NULL);
+INSERT INTO t2 VALUES(-288299,'hfrp',NULL,528477,730676.77);
+DELETE FROM t2 WHERE a < -60000;
+
+UPDATE t2 SET b = 'pgnnaaoflnw' WHERE a = 'bzbpi';
+UPDATE t2 SET c = -675583 WHERE a = 'rovoenxxj';
+UPDATE t2 SET d = X'09CDF2B2C241' WHERE a = 713220;
+
+INSERT INTO t1 VALUES(224938,'bmruycvfznhhnfmgqys','fr',854381,789143);
+INSERT INTO t1 VALUES(-863931,-1386.26,X'2A058540C2FB5C',NULL,X'F9D5990A');
+INSERT INTO t1 VALUES(673696,X'97301F0AC5735F44B5',X'440C',227999.92,-709599.79);
+INSERT INTO t1 VALUES(-243640,NULL,-71718.11,X'1EEFEB38',X'8CC7C55D95E142FBA5');
+INSERT INTO t1 VALUES(275893,X'',375606.30,X'0AF9EC334711FB',-468194);
+DELETE FROM t1 WHERE a > 200000;
+
+UPDATE t1 SET b = 'pgnnaaoflnw' WHERE a = -190462;
+UPDATE t1 SET c = -675583 WHERE a = -467665;
+UPDATE t1 SET d = X'09CDF2B2C241' WHERE a = -133045;
+
+}]
+
+foreach {tn idx} {
+  1 {
+  }
+  2 {
+    CREATE UNIQUE INDEX i1 ON t1(b, c, d);
+    CREATE UNIQUE INDEX i2 ON t1(d, e, a);
+    CREATE UNIQUE INDEX i3 ON t1(e, d, c, b);
+
+    CREATE UNIQUE INDEX i4 ON t2(b, c, d);
+    CREATE UNIQUE INDEX i5 ON t2(d, e, a);
+    CREATE UNIQUE INDEX i6 ON t2(e, d, c, b);
+  }
+} {
+  foreach cmd {run step} {
+    forcecopy test.db test.db2
+    forcecopy ota.db ota.db2
+
+    sqlite3 db test.db2
+    db eval $idx
+
+    do_test 2.$tn.$cmd.1 {
+      ${cmd}_ota test.db2 ota.db2
+      datacksum db
+    } $cksum
+
+    do_test 2.$tn.$cmd.2 {
+      db eval { PRAGMA integrity_check } 
+    } {ok}
+
+    db close
+  }
+}
 
 
 finish_test
index f6a8d1cd9c72b5d91a25199f582d99a58a667152..7cd0869d2065a4335a2694b08a8808ad6337dd21 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sextra\stests\sfor\sthe\sota\sextension.
-D 2014-09-19T15:06:23.790
+C Add\sfurther\stests\sto\sota5.test.\sAdd\s"ota.test",\sfor\srunning\sall\sota\stests.
+D 2014-09-19T18:08:39.681
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in cf57f673d77606ab0f2d9627ca52a9ba1464146a
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -123,11 +123,11 @@ F ext/misc/vtshim.c babb0dc2bf116029e3e7c9a618b8a1377045303e
 F ext/misc/wholenumber.c 784b12543d60702ebdd47da936e278aa03076212
 F ext/ota/README.txt cb11e39bfeba952ac8896dab860ada9d54731fb8
 F ext/ota/ota.c c11a85af71dccc45976622fe7a51169a481caa91
-F ext/ota/ota1.test 7cbf37a9f6cd29320f47b041cfeb0cc1d7eaa916
-F ext/ota/ota2.test 716f9c66e8bf8b0ad2fe3a5d8323e6cf460a2e27
-F ext/ota/ota3.test 1c48b7476af1c5920db9a43e7b1476d421a463b5
-F ext/ota/ota4.test baf23b47748a5056c713871959cc70fc623c90e9
-F ext/ota/ota5.test bd0e0f7609ece4eee2c62c5132935f0c80190cb8
+F ext/ota/ota1.test 86ff92699aad11e3c80a604832244a043c912a94
+F ext/ota/ota2.test 4568c2671d19dbde789fb9091d727a2e94880128
+F ext/ota/ota3.test 215dd4a8e238567e0f890a5139b6fdf5494ef311
+F ext/ota/ota4.test 60f897f329a6782ef2f24862640acf3c52e48077
+F ext/ota/ota5.test ad0799daf8923ddebffe75ae8c5504ca90b7fadb
 F ext/ota/sqlite3ota.c b22002105b3b7f3baf63bda2b4e6a00c4973418c
 F ext/ota/sqlite3ota.h 7b20abe9247d292429d00f0a5c237ff6e0dc0196
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
@@ -756,6 +756,7 @@ F test/orderby5.test 8f08a54836d21fb7c70245360751aedd1c2286fb
 F test/orderby6.test 8b38138ab0972588240b3fca0985d2e400432859
 F test/orderby7.test 3d1383d52ade5b9eb3a173b3147fdd296f0202da
 F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3
+F test/ota.test d81a211dfbdf9fe02b5ad50c86f8a5df924391f5
 F test/pager1.test 1acbdb14c5952a72dd43129cabdbf69aaa3ed1fa
 F test/pager2.test 67b8f40ae98112bcdba1f2b2d03ea83266418c71
 F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
@@ -768,7 +769,7 @@ F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0
 F test/pcache.test b09104b03160aca0d968d99e8cd2c5b1921a993d
 F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025
 F test/percentile.test b98fc868d71eb5619d42a1702e9ab91718cbed54
-F test/permutations.test cef25f5e8499a15846eccd06785f17f4180407ab
+F test/permutations.test 19cc048448340952b08a897167ec7b7bc85142b9
 F test/pragma.test 19d0241a007bcdd77fc2606ec60fc60357e7fc8b
 F test/pragma2.test aea7b3d82c76034a2df2b38a13745172ddc0bc13
 F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552
@@ -1207,7 +1208,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 718da6de870231d358384473b40e81c4394b8067
-R 4772700da78a181e555d5cf639b019fb
+P 1e468fe1e408e513a1e1bbe72fe2a240f2991b3d
+R 44fa742e94ebd7f402187be149604025
 U dan
-Z 93b575ac2dc5f2154ac020bd95667b18
+Z 7bef28ffbee5fdb05a4896f797ef3928
index 9eb7806eea1c12360f3c1672a9b5ed98e4a7fc8d..788cd2449bd63b4def8bdb6735289ea488252554 100644 (file)
@@ -1 +1 @@
-1e468fe1e408e513a1e1bbe72fe2a240f2991b3d
\ No newline at end of file
+95ffdaa542df1c28fac97422e5a4b2c5cb81d50a
\ No newline at end of file
diff --git a/test/ota.test b/test/ota.test
new file mode 100644 (file)
index 0000000..676666d
--- /dev/null
@@ -0,0 +1,16 @@
+# 2014 September 20
+#
+#    May you do good and not evil.
+#    May you find forgiveness for yourself and forgive others.
+#    May you share freely, never taking more than you give.
+#
+#***********************************************************************
+# This file runs all rtree related tests.
+#
+
+set testdir [file dirname $argv0]
+source $testdir/permutations.test
+
+run_test_suite ota
+
+finish_test
index 54239cc759531bf7771939a115063bb334d08f8d..b3c9e589348c244caa12de0955f7509f8d0fc60e 100644 (file)
@@ -923,6 +923,12 @@ test_suite "rtree" -description {
   All R-tree related tests. Provides coverage of source file rtree.c.
 } -files [glob -nocomplain $::testdir/../ext/rtree/*.test]
 
+test_suite "ota" -description {
+  OTA tests.
+} -files [
+  test_set [glob -nocomplain $::testdir/../ext/ota/*.test] -exclude ota.test
+]
+
 test_suite "no_optimization" -description {
   Run test scripts with optimizations disabled using the
   sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS) interface.