System.Data.SQLite
Check-in [4fdd8dee13]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update tests and suite helper library to account for caching of the XML configuration file name.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4fdd8dee13b40da228604f47a548187f41a0ba00
User & Date: mistachkin 2017-05-11 15:21:07
References
2017-05-11
15:48
Cherrypick of [92f1a8d6b95e5c0d], [2621aa6f2e116d71], [060be3824767ba41], and [4fdd8dee13b40da2], cache the assembly directory and XML configuration file name. check-in: defe7832c2 user: mistachkin tags: branch-1.0.105
Context
2017-05-11
15:54
Update version history docs. check-in: 13fa3545f6 user: mistachkin tags: trunk
15:48
Cherrypick of [92f1a8d6b95e5c0d], [2621aa6f2e116d71], [060be3824767ba41], and [4fdd8dee13b40da2], cache the assembly directory and XML configuration file name. check-in: defe7832c2 user: mistachkin tags: branch-1.0.105
15:21
Update tests and suite helper library to account for caching of the XML configuration file name. check-in: 4fdd8dee13 user: mistachkin tags: trunk
04:06
Cache the XML file name used by the configuration subsystem. check-in: 060be38247 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Tests/basic.eagle.

  4571   4571   
  4572   4572   ###############################################################################
  4573   4573   
  4574   4574   reportSQLiteResources $test_channel true
  4575   4575   
  4576   4576   ###############################################################################
  4577   4577   
  4578         -runTest {test data-1.87 {GetSettingValue cached assembly directory} -setup {
         4578  +runTest {test data-1.87 {GetSettingValue cached directory/file name} -setup {
  4579   4579     moveSystemDataSQLiteDllConfig false
  4580   4580   } -body {
  4581   4581     object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \
  4582   4582         GetSettingValue setting_for_data-1.87 null
  4583   4583   
  4584   4584     expr {[getOtherCount Method_ResetCachedAssemblyDirectory] == -1 && \
         4585  +      [getOtherCount Method_ResetCachedXmlConfigFileName] == -1 && \
  4585   4586         [getOtherCount Method_GetAssemblyDirectory] == 1 && \
  4586         -      [getOtherCount Method_GetCachedAssemblyDirectory] >= 1}
         4587  +      [getOtherCount Method_GetXmlConfigFileName] == 1 && \
         4588  +      [getOtherCount Method_GetCachedAssemblyDirectory] >= 1 && \
         4589  +      [getOtherCount Method_GetCachedXmlConfigFileName] >= 1}
  4587   4590   } -cleanup {
  4588   4591     moveSystemDataSQLiteDllConfig true
  4589   4592   } -constraints {eagle command.object monoBug28 System.Data.SQLite\
  4590   4593   buildConfiguration.Debug} -result {True}}
  4591   4594   
  4592   4595   ###############################################################################
  4593   4596   
  4594   4597   reportSQLiteResources $test_channel true
  4595   4598   
  4596   4599   ###############################################################################
  4597   4600   
  4598         -runTest {test data-1.88 {GetSettingValue cached assembly directory} -setup {
         4601  +runTest {test data-1.88 {GetSettingValue cached directory/file name} -setup {
  4599   4602     moveSystemDataSQLiteDllConfig false
  4600   4603   } -body {
  4601   4604     object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \
  4602   4605         GetSettingValue setting_for_data-1.88 null
  4603   4606   
  4604   4607     object invoke -flags +NonPublic \
  4605   4608         System.Data.SQLite.UnsafeNativeMethods ResetCachedAssemblyDirectory
  4606   4609   
         4610  +  object invoke -flags +NonPublic \
         4611  +      System.Data.SQLite.UnsafeNativeMethods ResetCachedXmlConfigFileName
         4612  +
  4607   4613     object invoke -flags +NonPublic System.Data.SQLite.UnsafeNativeMethods \
  4608   4614         GetSettingValue setting_for_data-1.88 null
  4609   4615   
  4610   4616     expr {[getOtherCount Method_ResetCachedAssemblyDirectory] == 1 && \
         4617  +      [getOtherCount Method_ResetCachedXmlConfigFileName] == 1 && \
  4611   4618         [getOtherCount Method_GetAssemblyDirectory] == 2 && \
  4612         -      [getOtherCount Method_GetCachedAssemblyDirectory] >= 2}
         4619  +      [getOtherCount Method_GetXmlConfigFileName] == 2 && \
         4620  +      [getOtherCount Method_GetCachedAssemblyDirectory] >= 2 && \
         4621  +      [getOtherCount Method_GetCachedXmlConfigFileName] >= 2}
  4613   4622   } -cleanup {
  4614   4623     moveSystemDataSQLiteDllConfig true
  4615   4624   } -constraints {eagle command.object monoBug28 System.Data.SQLite\
  4616   4625   buildConfiguration.Debug} -result {True}}
  4617   4626   
  4618   4627   ###############################################################################
  4619   4628   

Changes to lib/System.Data.SQLite/common.eagle.

  3471   3471   
  3472   3472         return -1
  3473   3473       }
  3474   3474   
  3475   3475       proc reportSQLiteResources {
  3476   3476               channel {quiet false} {reset true} {collect true} } {
  3477   3477         #
  3478         -      # NOTE: If possible, always reset the cached assembly directory.
         3478  +      # NOTE: If possible, always reset the cached assembly directory
         3479  +      #       and the cached XML configuration file name.
  3479   3480         #
  3480   3481         if {[haveSQLiteObjectCommand]} then {
  3481   3482           if {[catch {
  3482   3483             object invoke -flags +NonPublic \
  3483   3484                 System.Data.SQLite.UnsafeNativeMethods \
  3484   3485                 ResetCachedAssemblyDirectory
  3485   3486           } error] == 0} then {
  3486   3487             if {!$quiet} then {
  3487         -            tputs $channel "---- reset cached assembly directory"
         3488  +            tputs $channel "---- reset cached assembly directory\n"
  3488   3489             }
  3489   3490           } else {
  3490   3491             if {!$quiet} then {
  3491   3492               tputs $channel [appendArgs \
  3492   3493                   "==== WARNING: failed to reset cached assembly directory, " \
  3493   3494                   "error: " \n\t $error \n]
  3494   3495             }
  3495   3496           }
         3497  +
         3498  +        if {[catch {
         3499  +          object invoke -flags +NonPublic \
         3500  +              System.Data.SQLite.UnsafeNativeMethods \
         3501  +              ResetCachedXmlConfigFileName
         3502  +        } error] == 0} then {
         3503  +          if {!$quiet} then {
         3504  +            tputs $channel "---- reset cached XML configuration file name\n"
         3505  +          }
         3506  +        } else {
         3507  +          if {!$quiet} then {
         3508  +            tputs $channel [appendArgs \
         3509  +                "==== WARNING: failed to reset cached XML configuration " \
         3510  +                "file name, error: " \n\t $error \n]
         3511  +          }
         3512  +        }
  3496   3513         }
  3497   3514   
  3498   3515         #
  3499   3516         # NOTE: If available, report on (and possibly reset) the runtime
  3500   3517         #       configuration statistics.
  3501   3518         #
  3502   3519         if {[haveSQLiteObjectCommand] && \