mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
On Windows, make sure the current directory value used by the test suite is 'normalized' to what the parent command shell sees. Also, clean the test directories used by the quota2.test file.
FossilOrigin-Name: 82bcd7ec1531f6d71c079578434c58d3ce46a1de
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#
|
||||
# Commands to manipulate the db and the file-system at a high level:
|
||||
#
|
||||
# get_pwd
|
||||
# copy_file FROM TO
|
||||
# delete_file FILENAME
|
||||
# drop_all_tables ?DB?
|
||||
@ -148,6 +149,18 @@ proc getFileRetryDelay {} {
|
||||
return $::G(file-retry-delay)
|
||||
}
|
||||
|
||||
# Return the string representing the name of the current directory. On
|
||||
# Windows, the result is "normalized" to whatever our parent command shell
|
||||
# is using to prevent case-mismatch issues.
|
||||
#
|
||||
proc get_pwd {} {
|
||||
if {$::tcl_platform(platform) eq "windows"} {
|
||||
return [string trim [exec -- $::env(ComSpec) /c echo %CD%]]
|
||||
} else {
|
||||
return [pwd]
|
||||
}
|
||||
}
|
||||
|
||||
# Copy file $from into $to. This is used because some versions of
|
||||
# TCL for windows (notably the 8.4.1 binary package shipped with the
|
||||
# current mingw release) have a broken "file copy" command.
|
||||
@ -984,7 +997,7 @@ proc crashsql {args} {
|
||||
# $crashfile gets compared to the native filename in
|
||||
# cfSync(), which can be different then what TCL uses by
|
||||
# default, so here we force it to the "nativename" format.
|
||||
set cfile [string map {\\ \\\\} [file nativename [file join [pwd] $crashfile]]]
|
||||
set cfile [string map {\\ \\\\} [file nativename [file join [get_pwd] $crashfile]]]
|
||||
|
||||
set f [open crash.tcl w]
|
||||
puts $f "sqlite3_crash_enable 1"
|
||||
|
Reference in New Issue
Block a user