Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: third_party/sqlite/src/test/bc_common.tcl

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/backup_ioerr.test ('k') | third_party/sqlite/src/test/between.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2
3
4 proc bc_find_binaries {zCaption} {
5 # Search for binaries to test against. Any executable files that match
6 # our naming convention are assumed to be testfixture binaries to test
7 # against.
8 #
9 set binaries [list]
10 set pattern "[file tail [info nameofexec]]?*"
11 if {$::tcl_platform(platform)=="windows"} {
12 set pattern [string map {\.exe {}} $pattern]
13 }
14 foreach file [glob -nocomplain $pattern] {
15 if {[file executable $file] && [file isfile $file]} {lappend binaries $file}
16 }
17
18 if {[llength $binaries]==0} {
19 puts "WARNING: No historical binaries to test against."
20 puts "WARNING: Omitting backwards-compatibility tests"
21 }
22
23 foreach bin $binaries {
24 puts -nonewline "Testing against $bin - "
25 flush stdout
26 puts "version [get_version $bin]"
27 }
28
29 set ::BC(binaries) $binaries
30 return $binaries
31 }
32
33 proc get_version {binary} {
34 set chan [launch_testfixture $binary]
35 set v [testfixture $chan { sqlite3 -version }]
36 close $chan
37 set v
38 }
39
40 proc do_bc_test {bin script} {
41
42 forcedelete test.db
43 set ::bc_chan [launch_testfixture $bin]
44
45 proc code1 {tcl} { uplevel #0 $tcl }
46 proc code2 {tcl} { testfixture $::bc_chan $tcl }
47 proc sql1 sql { code1 [list db eval $sql] }
48 proc sql2 sql { code2 [list db eval $sql] }
49
50 code1 { sqlite3 db test.db }
51 code2 { sqlite3 db test.db }
52
53 set bintag [string map {testfixture {}} $bin]
54 set bintag [string map {\.exe {}} $bintag]
55 if {$bintag == ""} {set bintag self}
56 set saved_prefix $::testprefix
57 append ::testprefix ".$bintag"
58
59 uplevel $script
60
61 set ::testprefix $saved_prefix
62
63 catch { code1 { db close } }
64 catch { code2 { db close } }
65 catch { close $::bc_chan }
66 }
67
68 proc do_all_bc_test {script} {
69 foreach bin $::BC(binaries) {
70 uplevel [list do_bc_test $bin $script]
71 }
72 }
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/backup_ioerr.test ('k') | third_party/sqlite/src/test/between.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698