Index: Tests/tkt-da685c0bac.eagle ================================================================== --- Tests/tkt-da685c0bac.eagle +++ Tests/tkt-da685c0bac.eagle @@ -18,36 +18,36 @@ package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### -moveSystemDataSQLiteDllConfig false true +moveSystemDataSQLiteDllConfig false ############################################################################### runTest {test tkt-da685c0bac-1.1 {GetXmlConfigFileName path handling} -setup \ [getAppDomainPreamble] -body { package require Eagle.Library package require Eagle.Test package require System.Data.SQLite.Test - moveSystemDataSQLiteDllConfig false true + moveSystemDataSQLiteDllConfig false object load -loadtype Bytes [base64 encode [readFile [file join \ [getBinaryDirectory] System.Data.SQLite.dll]]] object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods GetXmlConfigFileName } -cleanup { - moveSystemDataSQLiteDllConfig true true + moveSystemDataSQLiteDllConfig true } -isolationLevel AppDomain -constraints \ {eagle command.object compile.ISOLATED_INTERPRETERS System.Data.SQLite\ defineConstant.System.Data.SQLite.USE_INTEROP_DLL} -result {}} ############################################################################### -moveSystemDataSQLiteDllConfig true true +moveSystemDataSQLiteDllConfig true ############################################################################### runSQLiteTestEpilogue runTestEpilogue Index: lib/System.Data.SQLite/common.eagle ================================================================== --- lib/System.Data.SQLite/common.eagle +++ lib/System.Data.SQLite/common.eagle @@ -233,11 +233,11 @@ } 2013 { return netFx451; # TODO: Or "netFx452"? } 2015 { - return netFx46; # TODO: Or "netFx461"? + return netFx46; # TODO: Or "netFx461" / "netFx462"? } default { return netFx35; # TODO: Good "fallback" default? } } @@ -247,28 +247,30 @@ # # NOTE: This procedure should return non-zero if the configured test # platform is most likely the default for this machine. # - proc isDefaultBuildPlatform { {verbose false} } { + proc isDefaultBuildPlatform { {verbose true} } { # # NOTE: Running on WoW64 is never the default platform. # if {[isRunningWoW64]} then { if {$verbose} then { tputs $::test_channel \ "---- detected non-default platform (WoW64)\n" } + return false } # # NOTE: This has a good chance of being the default platform. # if {$verbose} then { tputs $::test_channel "---- detected default platform\n" } + return true } proc getBuildPlatform { native } { if {[info exists ::test_platform] && \ @@ -1132,19 +1134,20 @@ } return $result } - proc moveSystemDataSQLiteDllConfig { {restore false} {verbose false} } { + proc moveSystemDataSQLiteDllConfig { {restore false} {verbose true} } { set directory [object invoke AppDomain CurrentDomain.BaseDirectory] if {[string length $directory] == 0} then { if {$verbose} then { tputs $::test_channel [appendArgs \ "---- skipped moving \"System.Data.SQLite.dll.config\", " \ "no base directory\n"] } + return } set fileName(1) [file normalize \ [file join $directory System.Data.SQLite.dll.config]] @@ -1227,19 +1230,20 @@ } } [getTestOverridesPreamble [list path test_channel]] $suffix]]] } proc tryCopyExternalFile { - fileName {platform ""} {newFileName ""} {verbose false} } { + fileName {platform ""} {newFileName ""} {verbose true} } { set sourceFileName [getExternalFileName $fileName] if {![file exists $sourceFileName]} then { if {$verbose} then { tputs $::test_channel [appendArgs \ "---- skipped copying external file \"" $sourceFileName \ "\", it does not exist\n"] } + return } if {[string length $newFileName] > 0} then { set targetFileName [getBinaryFileName $newFileName $platform] @@ -1251,10 +1255,11 @@ if {[catch { if {![file exists $targetDirectory]} then { file mkdir $targetDirectory } + file copy -force $sourceFileName $targetFileName }] == 0} then { tputs $::test_channel [appendArgs \ "---- copied external file from \"" $sourceFileName "\" to \"" \ $targetFileName \"\n] @@ -1264,19 +1269,20 @@ "\" to \"" $targetFileName \"\n] } } proc tryCopyBinaryFile { - fileName {platform ""} {newFileName ""} {verbose false} } { + fileName {platform ""} {newFileName ""} {verbose true} } { set sourceFileName [getBinaryFileName $fileName $platform] if {![file exists $sourceFileName]} then { if {$verbose} then { tputs $::test_channel [appendArgs \ "---- skipped copying binary file \"" $sourceFileName \ "\", it does not exist\n"] } + return } if {[string length $newFileName] > 0} then { set targetFileName [getBuildFileName $newFileName $platform] @@ -1288,10 +1294,11 @@ if {[catch { if {![file exists $targetDirectory]} then { file mkdir $targetDirectory } + file copy -force $sourceFileName $targetFileName }] == 0} then { tputs $::test_channel [appendArgs \ "---- copied binary file from \"" $sourceFileName "\" to \"" \ $targetFileName \"\n] @@ -1301,19 +1308,20 @@ "\" to \"" $targetFileName \"\n] } } proc tryCopyBuildFile { - fileName {platform ""} {newFileName ""} {verbose false} } { + fileName {platform ""} {newFileName ""} {verbose true} } { set sourceFileName [getBuildFileName $fileName $platform] if {![file exists $sourceFileName]} then { if {$verbose} then { tputs $::test_channel [appendArgs \ "---- skipped copying build file \"" $sourceFileName \ "\", it does not exist\n"] } + return } if {[string length $newFileName] > 0} then { set targetFileName [getBinaryFileName $newFileName $platform] @@ -1325,10 +1333,11 @@ if {[catch { if {![file exists $targetDirectory]} then { file mkdir $targetDirectory } + file copy -force $sourceFileName $targetFileName }] == 0} then { tputs $::test_channel [appendArgs \ "---- copied build file from \"" $sourceFileName "\" to \"" \ $targetFileName \"\n] @@ -1337,19 +1346,20 @@ "---- failed to copy build file from \"" $sourceFileName \ "\" to \"" $targetFileName \"\n] } } - proc tryDeleteBinaryFile { fileName {platform ""} {verbose false} } { + proc tryDeleteBinaryFile { fileName {platform ""} {verbose true} } { set fileName [getBinaryFileName $fileName $platform] if {![file exists $fileName]} then { if {$verbose} then { tputs $::test_channel [appendArgs \ "---- skipped deleting binary file \"" $fileName \ "\", it does not exist\n"] } + return } if {[catch {file delete $fileName}] == 0} then { tputs $::test_channel [appendArgs \ @@ -1358,19 +1368,20 @@ tputs $::test_channel [appendArgs \ "---- failed to delete binary file \"" $fileName \"\n] } } - proc tryDeleteBuildFile { fileName {platform ""} {verbose false} } { + proc tryDeleteBuildFile { fileName {platform ""} {verbose true} } { set fileName [getBuildFileName $fileName $platform] if {![file exists $fileName]} then { if {$verbose} then { tputs $::test_channel [appendArgs \ "---- skipped deleting build file \"" $fileName \ "\", it does not exist\n"] } + return } if {[catch {file delete $fileName}] == 0} then { tputs $::test_channel [appendArgs \ @@ -1380,21 +1391,21 @@ "---- failed to delete build file \"" $fileName \"\n] } } proc tryCopyAssembly { - fileName {platform ""} {pdb true} {verbose false} } { + fileName {platform ""} {pdb true} {verbose true} } { tryCopyBuildFile $fileName $platform "" $verbose if {$pdb} then { tryCopyBuildFile [appendArgs \ [file rootname $fileName] .pdb] $platform "" $verbose } } proc tryDeleteAssembly { - fileName {platform ""} {pdb true} {verbose false} } { + fileName {platform ""} {pdb true} {verbose true} } { tryDeleteBinaryFile $fileName $platform $verbose if {$pdb} then { tryDeleteBinaryFile [appendArgs \ [file rootname $fileName] .pdb] $platform $verbose @@ -3785,10 +3796,31 @@ # set managedFileNames [list \ System.Data.SQLite.dll System.Data.SQLite.Linq.dll \ System.Data.SQLite.EF6.dll] + # + # NOTE: Show the various lists of file names that are handled by this + # procedure. + # + tputs $::test_channel [appendArgs \ + "---- list of \"configuration\" file names is: " \ + $configFileNames \n] + + tputs $::test_channel [appendArgs \ + "---- list of \"MDA configuration\" file names is: " \ + $mdaConfigFileNames \n] + + tputs $::test_channel [appendArgs \ + "---- list of \"external\" file names is: " $externalFileNames \n] + + tputs $::test_channel [appendArgs \ + "---- list of \"native\" file names is: " $nativeFileNames \n] + + tputs $::test_channel [appendArgs \ + "---- list of \"managed\" file names is: " $managedFileNames \n] + # # NOTE: Remove any test constraints that refer to the native and/or # managed assembly files that we handle unless forbidden from # doing so. # @@ -3917,13 +3949,19 @@ # # NOTE: Skip trying to copy any files if instructed. # if {![info exists ::no(copySqliteFiles)]} then { if {![info exists ::no(copySqliteConfigFiles)]} then { + tputs $::test_channel \ + "---- start copying configuration files\n" + foreach fileName $configFileNames { tryCopyBuildFile $fileName } + + tputs $::test_channel \ + "---- end copying configuration files\n" } if {![info exists ::no(copySqliteExternalFiles)]} then { # # NOTE: Copy the Managed Debugging Assistants (MDA) configuration @@ -3931,59 +3969,95 @@ # while using each of the names of the various legacy test # executables. This will help to make sure that all the # legacy tests run with exactly the same set of Managed # Debugging Assistants configured. # + tputs $::test_channel \ + "---- start copying MDA configuration files\n" + foreach fileName $mdaConfigFileNames { tryCopyBinaryFile EagleShell.exe.mda.config "" $fileName } + tputs $::test_channel \ + "---- end copying MDA configuration files\n" + # # NOTE: Copy the external binaries, if any, to the directory that # contains the Eagle shell. This is typically used to make # sure assemblies referenced by the ones being tested are # available during the testing process. # + tputs $::test_channel "---- start copying external files\n" + foreach fileName $externalFileNames { tryCopyExternalFile $fileName } + + tputs $::test_channel "---- end copying external files\n" } if {![info exists ::no(copySqliteNativeFiles)]} then { # # NOTE: If the test platform is likely the default for this # machine, also try to copy the native files to the # binary location. # if {![info exists ::no(copySqliteImplicitFiles)] && \ - [isDefaultBuildPlatform true]} then { + [isDefaultBuildPlatform]} then { + tputs $::test_channel \ + "---- start copying implicit native files\n" + foreach fileName $nativeFileNames { tryCopyAssembly $fileName } + + tputs $::test_channel \ + "---- end copying implicit native files\n" } if {![info exists ::no(copySqliteNonImplicitFiles)]} then { if {![info exists ::no(copySqlitePlatformFiles)] && \ [string length $platform] > 0} then { + tputs $::test_channel [appendArgs \ + "---- start copying native files for platform \"" \ + $platform "\" files\n"] + foreach fileName $nativeFileNames { tryCopyAssembly $fileName $platform } + + tputs $::test_channel [appendArgs \ + "---- end copying native files for platform \"" \ + $platform "\" files\n"] } if {![info exists ::no(copySqliteArchitectureFiles)] && \ [string length $architecture] > 0} then { + tputs $::test_channel [appendArgs \ + "---- start copying native files for architecture \"" \ + $architecture "\" files\n"] + foreach fileName $nativeFileNames { tryCopyAssembly $fileName $architecture } + + tputs $::test_channel [appendArgs \ + "---- end copying native files for architecture \"" \ + $architecture "\" files\n"] } } } if {![info exists ::no(copySqliteManagedFiles)]} then { + tputs $::test_channel "---- start copying managed files\n" + foreach fileName $managedFileNames { tryCopyAssembly $fileName } + + tputs $::test_channel "---- end copying managed files\n" } } # # NOTE: Skip trying to load any files if instructed.