Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix comments and formatting. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | ef6 |
Files: | files | file ages | folders |
SHA1: |
2d06ea75ccfbc3d5e9fb32ca3d3bdeb3 |
User & Date: | mistachkin 2014-01-13 02:31:03.630 |
Context
2014-01-13
| ||
03:14 | Merge updates from trunk. check-in: ba04fdc873 user: mistachkin tags: ef6 | |
02:31 | Fix comments and formatting. check-in: 2d06ea75cc user: mistachkin tags: ef6 | |
02:16 | Further enhancements to the test suite infrastructure. check-in: da255bcf7c user: mistachkin tags: ef6 | |
Changes
Changes to Tests/common.eagle.
︙ | ︙ | |||
606 607 608 609 610 611 612 | # NOTE: Returns the full path for the file containing the SQLite core # native library code for this platform. First, check and see if # the SQLite core native library has already been loaded. Next, # fallback to what the full path should be, based on whether the # mixed-mode assembly is being used and the name of the current # platform. # | > | | < | | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 | # NOTE: Returns the full path for the file containing the SQLite core # native library code for this platform. First, check and see if # the SQLite core native library has already been loaded. Next, # fallback to what the full path should be, based on whether the # mixed-mode assembly is being used and the name of the current # platform. # if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods _SQLiteNativeModuleFileName } fileName] == 0 && [string length $fileName] > 0} then { # # NOTE: The SQLite core native library has already been loaded via # the native library pre-loader. Return that file name now. # return $fileName } |
︙ | ︙ | |||
834 835 836 837 838 839 840 | } else { set targetFileName [getBinaryFileName $fileName $platform] } set targetDirectory [file dirname $targetFileName] if {[catch { | | | | | > | 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 | } 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] |
︙ | ︙ | |||
868 869 870 871 872 873 874 | } else { set targetFileName [getBuildFileName $fileName $platform] } set targetDirectory [file dirname $targetFileName] if {[catch { | | | | | > | 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 | } 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] |
︙ | ︙ | |||
902 903 904 905 906 907 908 | } else { set targetFileName [getBinaryFileName $fileName $platform] } set targetDirectory [file dirname $targetFileName] if {[catch { | | | | | > | 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 | } 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] |
︙ | ︙ | |||
977 978 979 980 981 982 983 | [file rootname $fileName] .pdb] $platform } } proc tryLoadAssembly { fileName {platform ""} } { set fileName [getBinaryFileName $fileName $platform] | | | > | 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 | [file rootname $fileName] .pdb] $platform } } proc tryLoadAssembly { fileName {platform ""} } { set fileName [getBinaryFileName $fileName $platform] if {[catch { set assembly [object load -loadtype File -alias $fileName] }] == 0} then { # # NOTE: Now, add the necessary test constraint. # addConstraint [file rootname [file tail $fileName]] # # NOTE: Grab the image runtime version from the assembly because |
︙ | ︙ | |||
1186 1187 1188 1189 1190 1191 1192 | return false } proc checkForSQLiteLibrary { channel } { tputs $channel "---- checking for SQLite core library... " if {[catch { | | > | | > | | 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 | return false } proc checkForSQLiteLibrary { channel } { tputs $channel "---- checking for SQLite core library... " if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 SQLiteVersion } version] == 0} then { # # NOTE: Check if the returned version was null. If so, make it easy # to spot. # if {[string length $version] == 0} then { set version null } # # NOTE: Attempt to query the Fossil source identifier for the SQLite # core library. # if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 SQLiteSourceId } sourceId]} then { # # NOTE: We failed to query the Fossil source identifier. # set sourceId unknown } # |
︙ | ︙ | |||
1232 1233 1234 1235 1236 1237 1238 | } } proc checkForSQLiteInterop { channel } { tputs $channel "---- checking for SQLite interop assembly... " if {[catch { | | > | | > | | 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 | } } proc checkForSQLiteInterop { channel } { tputs $channel "---- checking for SQLite interop assembly... " if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 InteropVersion } version] == 0} then { # # NOTE: Check if the returned version was null. If so, make it easy # to spot. # if {[string length $version] == 0} then { set version null } # # NOTE: Attempt to query the Fossil source identifier for the SQLite # core library. # if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 InteropSourceId } sourceId]} then { # # NOTE: We failed to query the Fossil source identifier. # set sourceId unknown } # |
︙ | ︙ | |||
1280 1281 1282 1283 1284 1285 1286 | proc checkForSQLiteDefineConstant { channel name } { tputs $channel [appendArgs \ "---- checking for System.Data.SQLite define constant \"" $name \ "\"... "] if {[catch { | | > | | 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 | proc checkForSQLiteDefineConstant { channel name } { tputs $channel [appendArgs \ "---- checking for System.Data.SQLite define constant \"" $name \ "\"... "] if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 DefineConstants } defineConstants] == 0} then { if {[lsearch -exact -nocase $defineConstants $name] != -1} then { # # NOTE: Yes, this define constant was enabled when the managed # assembly was compiled. # addConstraint [appendArgs defineConstant.System.Data.SQLite. $name] |
︙ | ︙ | |||
1727 1728 1729 1730 1731 1732 1733 | # NOTE: This returns the ADO.NET IDbConnection object instance for the # specified databse handle. Since getting this object relies upon # Eagle internals, great care should be taken to avoid disposing of # this object or otherwise putting it into an invalid state. # if {[info exists db]} then { if {[catch { | | | | | 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 | # NOTE: This returns the ADO.NET IDbConnection object instance for the # specified databse handle. Since getting this object relies upon # Eagle internals, great care should be taken to avoid disposing of # this object or otherwise putting it into an invalid state. # if {[info exists db]} then { if {[catch { object invoke -flags +NonPublic -objectflags +NoDispose -alias \ Interpreter.GetActive.connections Item $db } result] == 0} then { # # NOTE: Success, return the opaque object handle. # return $result } else { # # NOTE: Failure, report why. |
︙ | ︙ | |||
2089 2090 2091 2092 2093 2094 2095 | if {$force || [isSQLiteReady]} then { # # BUGFIX: Before calling the native shutdown function, make sure both # of the PRAGMA related directory names are freed. # checkForSQLiteDirectories $channel true | > | | | | 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 | if {$force || [isSQLiteReady]} then { # # BUGFIX: Before calling the native shutdown function, make sure both # of the PRAGMA related directory names are freed. # checkForSQLiteDirectories $channel true if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods sqlite3_shutdown } result] == 0} then { if {!$quiet} then { tputs $channel [appendArgs \ "---- call sqlite3_shutdown()... ok: " $result \n] } } else { if {!$quiet} then { tputs $channel [appendArgs \ |
︙ | ︙ | |||
2117 2118 2119 2120 2121 2122 2123 | defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE] && \ [haveConstraint \ defineConstant.System.Data.SQLite.TRACK_MEMORY_BYTES]} then { if {!$quiet} then { tputs $channel "---- current memory in use by SQLiteMemory... " } | > | | | > | | | > | | | > | | | | 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 | defineConstant.System.Data.SQLite.INTEROP_VIRTUAL_TABLE] && \ [haveConstraint \ defineConstant.System.Data.SQLite.TRACK_MEMORY_BYTES]} then { if {!$quiet} then { tputs $channel "---- current memory in use by SQLiteMemory... " } if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLiteMemory bytesAllocated } memory] == 0} then { if {!$quiet} then { tputs $channel [appendArgs $memory " bytes\n"] } } else { set memory unknown if {!$quiet} then { tputs $channel [appendArgs $memory \n] } } if {!$quiet} then { tputs $channel "---- maximum memory in use by SQLiteMemory... " } if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLiteMemory maximumBytesAllocated } memory] == 0} then { if {!$quiet} then { tputs $channel [appendArgs $memory " bytes\n"] } } else { set memory unknown if {!$quiet} then { tputs $channel [appendArgs $memory \n] } } } if {!$quiet} then { tputs $channel "---- current memory in use by SQLite... " } if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods sqlite3_memory_used } memory] == 0} then { if {!$quiet} then { tputs $channel [appendArgs $memory " bytes\n"] } } else { # # NOTE: Maybe the SQLite core library is unavailable? # set memory unknown if {!$quiet} then { tputs $channel [appendArgs $memory \n] } } set result $memory; # NOTE: Return memory in-use to our caller. if {!$quiet} then { tputs $channel "---- maximum memory in use by SQLite... " } if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods sqlite3_memory_highwater 0 } memory] == 0} then { if {!$quiet} then { tputs $channel [appendArgs $memory " bytes\n"] } } else { # # NOTE: Maybe the SQLite core library is unavailable? # |
︙ | ︙ | |||
2240 2241 2242 2243 2244 2245 2246 | # NOTE: This call to the sqlite3_win32_set_directory function uses the # invalid value 0 for the first argument. This code is designed # to check if calling the function will raise an exception (i.e. # the actual result of the function does not matter as long as no # directory is changed). # if {[catch { | | | | > | 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 | # NOTE: This call to the sqlite3_win32_set_directory function uses the # invalid value 0 for the first argument. This code is designed # to check if calling the function will raise an exception (i.e. # the actual result of the function does not matter as long as no # directory is changed). # if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods \ sqlite3_win32_set_directory 0 null }] == 0} then { # # NOTE: Calling the sqlite3_win32_set_directory function does not # cause an exception; therefore, it must be available (i.e. # even though it should return a failure return code in this # case). # addConstraint sqlite3_win32_set_directory |
︙ | ︙ | |||
2265 2266 2267 2268 2269 2270 2271 | # NOTE: Now make sure the database and temporary directories are # reset their default values, which should be null for both. # Since the sqlite3_win32_set_directory function is available, # use it. # for {set index 1} {$index < 3} {incr index} { if {[catch { | | | | | | 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 | # NOTE: Now make sure the database and temporary directories are # reset their default values, which should be null for both. # Since the sqlite3_win32_set_directory function is available, # use it. # for {set index 1} {$index < 3} {incr index} { if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.UnsafeNativeMethods \ sqlite3_win32_set_directory $index null } result] == 0} then { tputs $channel [appendArgs \ "---- call sqlite3_win32_set_directory(" $index \ ", null)... ok: " $result \n] } else { tputs $channel [appendArgs \ "---- call sqlite3_win32_set_directory(" $index \ ", null)... error: " \n\t $result \n] |
︙ | ︙ | |||
2350 2351 2352 2353 2354 2355 2356 | if {[file exists $userSettingsFileName]} then { if {!$quiet} then { tputs $channel [appendArgs \ "---- loading per-user test settings file \"" \ $userSettingsFileName \"...\n] } | > | | | 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 | if {[file exists $userSettingsFileName]} then { if {!$quiet} then { tputs $channel [appendArgs \ "---- loading per-user test settings file \"" \ $userSettingsFileName \"...\n] } if {[catch { uplevel 1 [list source $userSettingsFileName] } error]} then { if {!$quiet} then { tputs $channel [appendArgs \ "==== WARNING: failed to load per-user settings file \"" \ $userSettingsFileName "\", error: " \n\t $error \n] } } } else { |
︙ | ︙ | |||
2380 2381 2382 2383 2384 2385 2386 | if {[file exists $hostSettingsFileName]} then { if {!$quiet} then { tputs $channel [appendArgs \ "---- loading per-host test settings file \"" \ $hostSettingsFileName \"...\n] } | > | | | 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 | if {[file exists $hostSettingsFileName]} then { if {!$quiet} then { tputs $channel [appendArgs \ "---- loading per-host test settings file \"" \ $hostSettingsFileName \"...\n] } if {[catch { uplevel 1 [list source $hostSettingsFileName] } error]} then { if {!$quiet} then { tputs $channel [appendArgs \ "==== WARNING: failed to load per-host settings file \"" \ $hostSettingsFileName "\", error: " \n\t $error \n] } } } else { |
︙ | ︙ | |||
2782 2783 2784 2785 2786 2787 2788 | } } catch { tputs $::test_channel \ "---- define constants for \"System.Data.SQLite\"... " | > | | | > | | | > | | | | 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 | } } catch { tputs $::test_channel \ "---- define constants for \"System.Data.SQLite\"... " if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 DefineConstants } defineConstants] == 0} then { tputs $::test_channel [appendArgs [formatList [lsort \ $defineConstants] <none>] \n] } else { tputs $::test_channel unknown\n } } catch { tputs $::test_channel \ "---- source version of \"System.Data.SQLite.dll\"... " if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLiteConnection ProviderVersion } version] == 0} then { if {[string length $version] == 0} then { set version null } tputs $::test_channel [appendArgs $version \n] } else { tputs $::test_channel unknown\n } } catch { tputs $::test_channel \ "---- source checkout of \"System.Data.SQLite.dll\"... " if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLiteConnection ProviderSourceId } sourceId] == 0} then { if {[string length $sourceId] == 0} then { set sourceId null } tputs $::test_channel [appendArgs $sourceId \n] } else { tputs $::test_channel unknown\n } |
︙ | ︙ | |||
2890 2891 2892 2893 2894 2895 2896 | set year [getBuildYear] addConstraint [appendArgs buildYear. $year] tputs $::test_channel [appendArgs \" $year \"\n] # # NOTE: Check the current build .NET Framework. Basically, this # indicates which version of the .NET Framework is being | | | 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 | set year [getBuildYear] addConstraint [appendArgs buildYear. $year] tputs $::test_channel [appendArgs \" $year \"\n] # # NOTE: Check the current build .NET Framework. Basically, this # indicates which version of the .NET Framework is being # used by the assembly binaries under test. # tputs $::test_channel \ "---- checking for System.Data.SQLite build .NET Framework... " set netFx [getBuildNetFx] addConstraint [appendArgs buildFramework. $netFx] tputs $::test_channel [appendArgs \" $netFx \"\n] |
︙ | ︙ | |||
2971 2972 2973 2974 2975 2976 2977 | } } catch { tputs $::test_channel \ "---- compile-time options for SQLite core library... " | > | | | > | | | | 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 | } } catch { tputs $::test_channel \ "---- compile-time options for SQLite core library... " if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 SQLiteCompileOptions } compileOptions] == 0} then { tputs $::test_channel [appendArgs [formatList [lsort \ $compileOptions] <none>] \n] } else { tputs $::test_channel unknown\n } } catch { tputs $::test_channel \ "---- compile-time options for SQLite interop assembly... " if {[catch { object invoke -flags +NonPublic \ System.Data.SQLite.SQLite3 InteropCompileOptions } compileOptions] == 0} then { tputs $::test_channel [appendArgs [formatList [lsort \ $compileOptions] <none>] \n] } else { tputs $::test_channel unknown\n } } |
︙ | ︙ |