/ Check-in [72389c29]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Enable some more tests on Windows.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 72389c295bb240ec76746e289403b82e04189903
User & Date: mistachkin 2013-10-31 06:13:57
Context
2013-10-31
06:39
Update comments in the MSVC batch build tool. check-in: 0414bb73 user: mistachkin tags: trunk
06:13
Enable some more tests on Windows. check-in: 72389c29 user: mistachkin tags: trunk
06:11
Fix harmless compiler warnings. check-in: 1a0a8865 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_config.c.

   248    248   #ifdef SQLITE_OMIT_COMPOUND_SELECT
   249    249     Tcl_SetVar2(interp, "sqlite_options", "compound", "0", TCL_GLOBAL_ONLY);
   250    250   #else
   251    251     Tcl_SetVar2(interp, "sqlite_options", "compound", "1", TCL_GLOBAL_ONLY);
   252    252   #endif
   253    253   
   254    254     Tcl_SetVar2(interp, "sqlite_options", "conflict", "1", TCL_GLOBAL_ONLY);
   255         -
   256         -#if SQLITE_OS_UNIX
   257    255     Tcl_SetVar2(interp, "sqlite_options", "crashtest", "1", TCL_GLOBAL_ONLY);
   258         -#else
   259         -  Tcl_SetVar2(interp, "sqlite_options", "crashtest", "0", TCL_GLOBAL_ONLY);
   260         -#endif
   261    256   
   262    257   #ifdef SQLITE_OMIT_DATETIME_FUNCS
   263    258     Tcl_SetVar2(interp, "sqlite_options", "datetime", "0", TCL_GLOBAL_ONLY);
   264    259   #else
   265    260     Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
   266    261   #endif
   267    262   

Changes to test/crash8.test.

   337    337   
   338    338     do_test crash8-4.10 {
   339    339       delete_file $zMasterJournal
   340    340       execsql { SELECT b FROM main.ab WHERE a = 0 }
   341    341     } {jkl}
   342    342   }
   343    343   
   344         -for {set i 1} {$i < 10} {incr i} {
   345         -  catch { db close }
   346         -  forcedelete test.db test.db-journal
   347         -  sqlite3 db test.db
   348         -  do_test crash8-5.$i.1 {
   349         -    execsql {
   350         -      CREATE TABLE t1(x PRIMARY KEY);
   351         -      INSERT INTO t1 VALUES(randomblob(900));
   352         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   353         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   354         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   355         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   356         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   357         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;          /* 64 rows */
   358         -    }
   359         -    crashsql -file test.db -delay [expr ($::i%2) + 1] {
   360         -      PRAGMA cache_size = 10;
   361         -      BEGIN;
   362         -        UPDATE t1 SET x = randomblob(900);
   363         -      ROLLBACK;
   364         -      INSERT INTO t1 VALUES(randomblob(900));
   365         -    }
   366         -    execsql { PRAGMA integrity_check }
   367         -  } {ok}
          344  +#
          345  +# Since the following tests (crash8-5.*) rely upon being able
          346  +# to copy a file while open, they will not work on Windows.
          347  +#
          348  +if {$::tcl_platform(platform)=="unix"} {
          349  +  for {set i 1} {$i < 10} {incr i} {
          350  +    catch { db close }
          351  +    forcedelete test.db test.db-journal
          352  +    sqlite3 db test.db
          353  +    do_test crash8-5.$i.1 {
          354  +      execsql {
          355  +        CREATE TABLE t1(x PRIMARY KEY);
          356  +        INSERT INTO t1 VALUES(randomblob(900));
          357  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          358  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          359  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          360  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          361  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          362  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;          /* 64 rows */
          363  +      }
          364  +      crashsql -file test.db -delay [expr ($::i%2) + 1] {
          365  +        PRAGMA cache_size = 10;
          366  +        BEGIN;
          367  +          UPDATE t1 SET x = randomblob(900);
          368  +        ROLLBACK;
          369  +        INSERT INTO t1 VALUES(randomblob(900));
          370  +      }
          371  +      execsql { PRAGMA integrity_check }
          372  +    } {ok}
   368    373     
   369         -  catch { db close }
   370         -  forcedelete test.db test.db-journal
   371         -  sqlite3 db test.db
   372         -  do_test crash8-5.$i.2 {
   373         -    execsql {
   374         -      PRAGMA cache_size = 10;
   375         -      CREATE TABLE t1(x PRIMARY KEY);
   376         -      INSERT INTO t1 VALUES(randomblob(900));
   377         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   378         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   379         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   380         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   381         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;
   382         -      INSERT INTO t1 SELECT randomblob(900) FROM t1;          /* 64 rows */
   383         -      BEGIN;
   384         -        UPDATE t1 SET x = randomblob(900);
   385         -    }
   386         -    forcedelete testX.db testX.db-journal testX.db-wal
   387         -    forcecopy test.db testX.db
   388         -    forcecopy test.db-journal testX.db-journal
   389         -    db close
          374  +    catch { db close }
          375  +    forcedelete test.db test.db-journal
          376  +    sqlite3 db test.db
          377  +    do_test crash8-5.$i.2 {
          378  +      execsql {
          379  +        PRAGMA cache_size = 10;
          380  +        CREATE TABLE t1(x PRIMARY KEY);
          381  +        INSERT INTO t1 VALUES(randomblob(900));
          382  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          383  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          384  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          385  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          386  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;
          387  +        INSERT INTO t1 SELECT randomblob(900) FROM t1;          /* 64 rows */
          388  +        BEGIN;
          389  +          UPDATE t1 SET x = randomblob(900);
          390  +      }
          391  +      forcedelete testX.db testX.db-journal testX.db-wal
          392  +      forcecopy test.db testX.db
          393  +      forcecopy test.db-journal testX.db-journal
          394  +      db close
          395  +
          396  +      crashsql -file test.db -delay [expr ($::i%2) + 1] {
          397  +        SELECT * FROM sqlite_master;
          398  +        INSERT INTO t1 VALUES(randomblob(900));
          399  +      }
   390    400   
   391         -    crashsql -file test.db -delay [expr ($::i%2) + 1] {
   392         -      SELECT * FROM sqlite_master;
   393         -      INSERT INTO t1 VALUES(randomblob(900));
   394         -    }
   395         -
   396         -    sqlite3 db2 testX.db
   397         -    execsql { PRAGMA integrity_check } db2
   398         -  } {ok}
          401  +      sqlite3 db2 testX.db
          402  +      execsql { PRAGMA integrity_check } db2
          403  +    } {ok}
          404  +  }
          405  +  catch {db2 close}
   399    406   }
   400         -catch {db2 close}
   401    407   
   402    408   finish_test