Artifact
55563972ba0019716d5f5a6997ced2ff7d7ee821:
- File
Tests/version.eagle
— part of check-in
[7d572c8589]
at
2012-12-30 17:01:10
on branch trunk
— Bump all versions to 1.0.84.0. Update SQLite core library to the latest trunk code. Add Cancel method to the SQLiteConnection class. In the SQLiteLog.LogMessage method, clone the event handlers before invoking them to improve thread safety.
(user:
mistachkin
size: 13896)
###############################################################################
#
# version.eagle --
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################
package require Eagle
package require Eagle.Library
package require Eagle.Test
runTestPrologue
###############################################################################
package require System.Data.SQLite.Test
runSQLiteTestPrologue
###############################################################################
# ******************** BEGIN VOLATILE VERSION INFORMATION *********************
###############################################################################
#
# NOTE: For these unit tests to be useful and accurate, the following version
# numbers must be manually kept synchronized with the version numbers for
# the source code files, the built binaries, and the release packages.
#
set version(major) 1
set version(minor) 0
set version(build) 84; # NOTE: Incremented with each release.
set version(revision) 0
###############################################################################
# ********************* END VOLATILE VERSION INFORMATION **********************
###############################################################################
#
# NOTE: Build the full version number using the components setup above. This
# should not have to be changed.
#
set version(full) [appendArgs $version(major) . $version(minor) . \
$version(build) . $version(revision)]
###############################################################################
#
# NOTE: Setup the variables that refer to the various files required by the
# tests in this file.
#
set systemDataSQLiteDllFile [getBuildFileName System.Data.SQLite.dll]
set systemDataSQLiteLinqDllFile [getBuildFileName System.Data.SQLite.Linq.dll]
set sqliteDesignerDllFile [getBuildFileName SQLite.Designer.dll]
set testExeFile [getBuildFileName test.exe]
set testLinqExeFile [getBuildFileName testlinq.exe]
#
# NOTE: Setup the test constraints specific to the tests in this file.
#
if {![haveConstraint [appendArgs file_ \
[file tail $systemDataSQLiteDllFile]]]} then {
checkForFile $test_channel $systemDataSQLiteDllFile
}
if {![haveConstraint [appendArgs file_ \
[file tail $systemDataSQLiteLinqDllFile]]]} then {
checkForFile $test_channel $systemDataSQLiteLinqDllFile
}
if {![haveConstraint [appendArgs file_ \
[file tail $sqliteDesignerDllFile]]]} then {
checkForFile $test_channel $sqliteDesignerDllFile
}
if {![haveConstraint [appendArgs file_ [file tail $testExeFile]]]} then {
checkForFile $test_channel $testExeFile
}
if {![haveConstraint [appendArgs file_ [file tail $testLinqExeFile]]]} then {
checkForFile $test_channel $testLinqExeFile
}
###############################################################################
runTest {test version-1.1 {'System.Data.SQLite' binary version} -body {
file version $systemDataSQLiteDllFile
} -constraints {eagle file_System.Data.SQLite.dll} -result $version(full)}
###############################################################################
runTest {test version-1.2 {'System.Data.SQLite' assembly version} -body {
set assemblyName [object invoke -alias System.Reflection.AssemblyName \
GetAssemblyName $systemDataSQLiteDllFile]
$assemblyName Version.ToString
} -cleanup {
unset -nocomplain assemblyName
} -constraints {eagle file_System.Data.SQLite.dll} -result $version(full)}
###############################################################################
runTest {test version-1.3 {'System.Data.SQLite.Linq' binary version} -body {
file version $systemDataSQLiteLinqDllFile
} -constraints {eagle file_System.Data.SQLite.Linq.dll} -result $version(full)}
###############################################################################
runTest {test version-1.4 {'System.Data.SQLite.Linq' assembly version} -body {
set assemblyName [object invoke -alias System.Reflection.AssemblyName \
GetAssemblyName $systemDataSQLiteLinqDllFile]
$assemblyName Version.ToString
} -cleanup {
unset -nocomplain assemblyName
} -constraints {eagle file_System.Data.SQLite.Linq.dll} -result $version(full)}
###############################################################################
runTest {test version-1.5 {'SQLite.Designer' binary version} -body {
file version $sqliteDesignerDllFile
} -constraints {eagle file_SQLite.Designer.dll} -result $version(full)}
###############################################################################
runTest {test version-1.6 {'SQLite.Designer' assembly version} -body {
set assemblyName [object invoke -alias System.Reflection.AssemblyName \
GetAssemblyName $sqliteDesignerDllFile]
$assemblyName Version.ToString
} -cleanup {
unset -nocomplain assemblyName
} -constraints {eagle file_SQLite.Designer.dll} -result $version(full)}
###############################################################################
runTest {test version-1.7 {'test' binary version} -body {
file version $testExeFile
} -constraints {eagle file_test.exe} -result $version(full)}
###############################################################################
runTest {test version-1.8 {'test' assembly version} -body {
set assemblyName [object invoke -alias System.Reflection.AssemblyName \
GetAssemblyName $testExeFile]
$assemblyName Version.ToString
} -cleanup {
unset -nocomplain assemblyName
} -constraints {eagle file_test.exe} -result $version(full)}
###############################################################################
runTest {test version-1.9 {'testlinq' binary version} -body {
file version $testLinqExeFile
} -constraints {eagle file_testlinq.exe} -result $version(full)}
###############################################################################
runTest {test version-1.10 {'testlinq' assembly version} -body {
set assemblyName [object invoke -alias System.Reflection.AssemblyName \
GetAssemblyName $testLinqExeFile]
$assemblyName Version.ToString
} -cleanup {
unset -nocomplain assemblyName
} -constraints {eagle file_testlinq.exe} -result $version(full)}
###############################################################################
set patterns [list \
[appendArgs Version= [string map [list . \\.] $version(full)] ,] \
[appendArgs <version> [string map [list . \\.] $version(full)] \
</version>] \
[appendArgs <version> [string map [list . \\.] $version(full)] \
</version>] \
[appendArgs <version> [string map [list . \\.] $version(full)] \
</version>] \
[appendArgs <version> [string map [list . \\.] $version(full)] \
</version>] \
[appendArgs Version= [string map [list . \\.] $version(full)] ,] \
[appendArgs "\; [format %03d $version(build)] "\;] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs <Version> [string map [list . \\.] \
$version(full)] </Version>] \
[appendArgs Value=\" [format %03d $version(build)] \"] \
[appendArgs Value=\" [string map [list . \\.] $version(full)] \"] \
[appendArgs Value=\" [string map [list . ,] $version(full)] \"] \
[appendArgs Value=\" [format %03d $version(build)] \"] \
[appendArgs Value=\" [string map [list . \\.] $version(full)] \"] \
[appendArgs Value=\" [string map [list . ,] $version(full)] \"] \
[appendArgs <INTEROP_BUILD_NUMBER> [format %03d $version(build)] \
</INTEROP_BUILD_NUMBER>] \
[appendArgs <INTEROP_MANIFEST_VERSION> [string map [list . \\.] \
$version(full)] </INTEROP_MANIFEST_VERSION>] \
[appendArgs <INTEROP_RC_VERSION> [string map [list . ,] \
$version(full)] </INTEROP_RC_VERSION>] \
[appendArgs <INTEROP_BUILD_NUMBER> [format %03d $version(build)] \
</INTEROP_BUILD_NUMBER>] \
[appendArgs <INTEROP_MANIFEST_VERSION> [string map [list . \\.] \
$version(full)] </INTEROP_MANIFEST_VERSION>] \
[appendArgs <INTEROP_RC_VERSION> [string map [list . ,] \
$version(full)] </INTEROP_RC_VERSION>] \
[appendArgs \" [string map [list . \\.] $version(full)] \"] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs \" [string map [list . \\.] $version(full)] \"] \
[appendArgs \"SQLite.Interop. [format %03d $version(build)] .dll\"] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs Version= [string map [list . \\.] $version(full)] ,] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs Version= [string map [list . \\.] $version(full)] ,] \
[appendArgs Version= [string map [list . \\.] $version(full)] ,] \
[appendArgs Version= [string map [list . \\.] $version(full)] ,] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)] \
[appendArgs AssemblyFileVersion\\(\" [string map [list . \\.] \
$version(full)] \"\\)]]
set fileNames [list \
readme.htm \
SQLite.nuspec \
SQLite.MSIL.nuspec \
SQLite.x64.nuspec \
SQLite.x86.nuspec \
[file join Doc Extra dbfactorysupport.html] \
[file join Doc Extra welcome.html] \
[file join Membership Properties AssemblyInfo.cs] \
[file join Membership Properties AssemblyInfo.cs] \
[file join SQLite.Designer AssemblyInfo.cs] \
[file join SQLite.Designer AssemblyInfo.cs] \
[file join SQLite.Designer source.extension.vsixmanifest] \
[file join SQLite.Interop props SQLite.Interop.2005.vsprops] \
[file join SQLite.Interop props SQLite.Interop.2005.vsprops] \
[file join SQLite.Interop props SQLite.Interop.2005.vsprops] \
[file join SQLite.Interop props SQLite.Interop.2008.vsprops] \
[file join SQLite.Interop props SQLite.Interop.2008.vsprops] \
[file join SQLite.Interop props SQLite.Interop.2008.vsprops] \
[file join SQLite.Interop props SQLite.Interop.2010.props] \
[file join SQLite.Interop props SQLite.Interop.2010.props] \
[file join SQLite.Interop props SQLite.Interop.2010.props] \
[file join SQLite.Interop props SQLite.Interop.2012.props] \
[file join SQLite.Interop props SQLite.Interop.2012.props] \
[file join SQLite.Interop props SQLite.Interop.2012.props] \
[file join SQLite.Interop src win interop.h] \
[file join System.Data.SQLite AssemblyInfo.cs] \
[file join System.Data.SQLite AssemblyInfo.cs] \
[file join System.Data.SQLite SQLite3.cs] \
[file join System.Data.SQLite UnsafeNativeMethods.cs] \
[file join System.Data.SQLite.Linq AssemblyInfo.cs] \
[file join System.Data.SQLite.Linq AssemblyInfo.cs] \
[file join test AssemblyInfo.cs] \
[file join test AssemblyInfo.cs] \
[file join test app.config] \
[file join testce AssemblyInfo.cs] \
[file join testce AssemblyInfo.cs] \
[file join testlinq 2008 App.config] \
[file join testlinq 2010 App.config] \
[file join testlinq 2012 App.config] \
[file join testlinq Properties AssemblyInfo.cs] \
[file join testlinq Properties AssemblyInfo.cs] \
[file join tools install Properties AssemblyInfo.cs] \
[file join tools install Properties AssemblyInfo.cs]]
for {set i 1} {$i <= [llength $fileNames]} {incr i} {
set pattern [lindex $patterns [expr {$i - 1}]]
set fileName [lindex $fileNames [expr {$i - 1}]]
set constraint [string map [list / _ \\ _] $fileName]
set fileName [file join $root_path $fileName]
if {![haveConstraint [appendArgs file_ $constraint]]} then {
checkForFile $test_channel $fileName $constraint
}
runTest {test [appendArgs version-1.11. $i] \
[appendArgs "pattern {" $pattern "} in file \"" $fileName \"] -body {
regexp -- $pattern [readFile $fileName]
} -constraints [list eagle [appendArgs file_ $constraint]] -result {1}}
}
###############################################################################
unset -nocomplain constraint fileName pattern fileNames patterns i version
###############################################################################
unset -nocomplain testLinqExeFile testExeFile sqliteDesignerDllFile \
systemDataSQLiteLinqDllFile systemDataSQLiteDllFile
###############################################################################
runSQLiteTestEpilogue
runTestEpilogue