Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | In the test suite infrastructure, enable verbose mode by default for all file copy/delete operations. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
0c988593134df6632bfec3371894f052 |
User & Date: | mistachkin 2016-08-30 03:12:05.019 |
Context
2016-08-30
| ||
14:15 | Break out the mixed-mode assembly file delete/copy handling in the test suite infrastructure. check-in: e4a002b0c0 user: mistachkin tags: trunk | |
03:12 | In the test suite infrastructure, enable verbose mode by default for all file copy/delete operations. check-in: 0c98859313 user: mistachkin tags: trunk | |
00:49 | Revise a diagnostic message in the native library pre-loader. In the test suite infrastructure, always check for ::tcl_platform(machine) before trying to use it. check-in: 2bce278174 user: mistachkin tags: trunk | |
Changes
Changes to Tests/tkt-da685c0bac.eagle.
︙ | ︙ | |||
16 17 18 19 20 21 22 | ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### | | | | | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | ############################################################################### package require System.Data.SQLite.Test runSQLiteTestPrologue ############################################################################### 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 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 } -isolationLevel AppDomain -constraints \ {eagle command.object compile.ISOLATED_INTERPRETERS System.Data.SQLite\ defineConstant.System.Data.SQLite.USE_INTEROP_DLL} -result {}} ############################################################################### moveSystemDataSQLiteDllConfig true ############################################################################### runSQLiteTestEpilogue runTestEpilogue |
Changes to lib/System.Data.SQLite/common.eagle.
︙ | ︙ | |||
231 232 233 234 235 236 237 | 2012 { return netFx45 } 2013 { return netFx451; # TODO: Or "netFx452"? } 2015 { | | | > > | 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | 2012 { return netFx45 } 2013 { return netFx451; # TODO: Or "netFx452"? } 2015 { return netFx46; # TODO: Or "netFx461" / "netFx462"? } default { return netFx35; # TODO: Good "fallback" default? } } } } } # # NOTE: This procedure should return non-zero if the configured test # platform is most likely the default for this machine. # 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] && \ [string length $::test_platform] > 0} then { # |
︙ | ︙ | |||
1130 1131 1132 1133 1134 1135 1136 | if {[string length $result] > 0} then { append result \n } return $result } | | > | 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 | if {[string length $result] > 0} then { append result \n } return $result } 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]] set fileName(2) [appendArgs $fileName(1) .moved] |
︙ | ︙ | |||
1225 1226 1227 1228 1229 1230 1231 | catch { changeNativeRuntimeOption [hasRuntimeOption native] } } [getTestOverridesPreamble [list path test_channel]] $suffix]]] } proc tryCopyExternalFile { | | > > | > > | > > | > | > | | | 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 | catch { changeNativeRuntimeOption [hasRuntimeOption native] } } [getTestOverridesPreamble [list path test_channel]] $suffix]]] } proc tryCopyExternalFile { 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] } else { set targetFileName [getBinaryFileName $fileName $platform] } set targetDirectory [file dirname $targetFileName] 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] } else { tputs $::test_channel [appendArgs \ "---- failed to copy external file from \"" $sourceFileName \ "\" to \"" $targetFileName \"\n] } } proc tryCopyBinaryFile { 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] } else { set targetFileName [getBuildFileName $fileName $platform] } set targetDirectory [file dirname $targetFileName] 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] } else { tputs $::test_channel [appendArgs \ "---- failed to copy binary file from \"" $sourceFileName \ "\" to \"" $targetFileName \"\n] } } proc tryCopyBuildFile { 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] } else { set targetFileName [getBinaryFileName $fileName $platform] } set targetDirectory [file dirname $targetFileName] 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] } else { tputs $::test_channel [appendArgs \ "---- failed to copy build file from \"" $sourceFileName \ "\" to \"" $targetFileName \"\n] } } 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 \ "---- deleted binary file \"" $fileName \"\n] } else { tputs $::test_channel [appendArgs \ "---- failed to delete binary file \"" $fileName \"\n] } } 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 \ "---- deleted build file \"" $fileName \"\n] } else { tputs $::test_channel [appendArgs \ "---- failed to delete build file \"" $fileName \"\n] } } proc tryCopyAssembly { 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 true} } { tryDeleteBinaryFile $fileName $platform $verbose if {$pdb} then { tryDeleteBinaryFile [appendArgs \ [file rootname $fileName] .pdb] $platform $verbose } } |
︙ | ︙ | |||
3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 | # # NOTE: Build the list of managed assembly files that we handle. # set managedFileNames [list \ System.Data.SQLite.dll System.Data.SQLite.Linq.dll \ System.Data.SQLite.EF6.dll] # # NOTE: Remove any test constraints that refer to the native and/or # managed assembly files that we handle unless forbidden from # doing so. # if {![info exists ::no(sqliteRemoveConstraints)]} then { foreach fileName $configFileNames { | > > > > > > > > > > > > > > > > > > > > > | 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 | # # NOTE: Build the list of managed assembly files that we handle. # 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. # if {![info exists ::no(sqliteRemoveConstraints)]} then { foreach fileName $configFileNames { |
︙ | ︙ | |||
3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 | } # # NOTE: Skip trying to copy any files if instructed. # if {![info exists ::no(copySqliteFiles)]} then { if {![info exists ::no(copySqliteConfigFiles)]} then { foreach fileName $configFileNames { tryCopyBuildFile $fileName } } if {![info exists ::no(copySqliteExternalFiles)]} then { # # NOTE: Copy the Managed Debugging Assistants (MDA) configuration # file for the Eagle shell to the build output directory, # 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. # foreach fileName $mdaConfigFileNames { tryCopyBinaryFile EagleShell.exe.mda.config "" $fileName } # # 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. # foreach fileName $externalFileNames { tryCopyExternalFile $fileName } } 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)] && \ | > > > > > > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > | 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 | } # # 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 # file for the Eagle shell to the build output directory, # 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]} 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. # if {![info exists ::no(loadSqliteFiles)]} then { |
︙ | ︙ |