OLD | NEW |
1 # | 1 # |
2 # May you do good and not evil. | 2 # May you do good and not evil. |
3 # May you find forgiveness for yourself and forgive others. | 3 # May you find forgiveness for yourself and forgive others. |
4 # May you share freely, never taking more than you give. | 4 # May you share freely, never taking more than you give. |
5 # | 5 # |
6 #*********************************************************************** | 6 #*********************************************************************** |
7 # This file runs all tests. | 7 # This file runs all tests. |
8 # | 8 # |
9 # $Id: async.test,v 1.21 2009/06/05 17:09:12 drh Exp $ | 9 # $Id: async.test,v 1.21 2009/06/05 17:09:12 drh Exp $ |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 flush_async_queue | 61 flush_async_queue |
62 } | 62 } |
63 | 63 |
64 foreach testfile [lsort -dictionary [glob $testdir/*.test]] { | 64 foreach testfile [lsort -dictionary [glob $testdir/*.test]] { |
65 set tail [file tail $testfile] | 65 set tail [file tail $testfile] |
66 if {[lsearch -exact $ASYNC_INCLUDE $tail]<0} continue | 66 if {[lsearch -exact $ASYNC_INCLUDE $tail]<0} continue |
67 source $testfile | 67 source $testfile |
68 | 68 |
69 # Make sure everything is flushed through. This is because [source]ing | 69 # Make sure everything is flushed through. This is because [source]ing |
70 # the next test file will delete the database file on disk (using | 70 # the next test file will delete the database file on disk (using |
71 # [file delete]). If the asynchronous backend still has the file | 71 # [delete_file]). If the asynchronous backend still has the file |
72 # open, it will become confused. | 72 # open, it will become confused. |
73 # | 73 # |
74 flush_async_queue | 74 flush_async_queue |
75 } | 75 } |
76 | 76 |
77 # Flush the write-queue and disable asynchronous IO. This should ensure | 77 # Flush the write-queue and disable asynchronous IO. This should ensure |
78 # all allocated memory is cleaned up. | 78 # all allocated memory is cleaned up. |
79 set sqlite3async_trace 1 | 79 set sqlite3async_trace 1 |
80 flush_async_queue | 80 flush_async_queue |
81 sqlite3async_shutdown | 81 sqlite3async_shutdown |
82 set sqlite3async_trace 0 | 82 set sqlite3async_trace 0 |
83 | 83 |
84 rename do_test {} | 84 rename do_test {} |
85 rename async_really_do_test do_test | 85 rename async_really_do_test do_test |
86 rename finish_test {} | 86 rename finish_test {} |
87 rename async_really_finish_test finish_test | 87 rename async_really_finish_test finish_test |
88 | 88 |
89 if {[info exists ASYNC_SAVE_ISQUICK]} { set G(isquick) $ASYNC_SAVE_ISQUICK } | 89 if {[info exists ASYNC_SAVE_ISQUICK]} { set G(isquick) $ASYNC_SAVE_ISQUICK } |
90 finish_test | 90 finish_test |
OLD | NEW |