System.Data.SQLite
Check-in [c093917164]
Not logged in

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

Overview
Comment:Enhancements to test suite to improve detection of encrypted database support.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c093917164079ed3441f9940b8acfe6cdf2cdd78
User & Date: mistachkin 2018-02-20 12:18:18
Context
2018-02-20
12:19
Make the shell scripts used to run the test suite on POSIX more flexible. check-in: 7c6f27738b user: mistachkin tags: trunk
12:18
Enhancements to test suite to improve detection of encrypted database support. check-in: c093917164 user: mistachkin tags: trunk
10:46
Test portability fixes for Mono on POSIX. check-in: ed9c4825db user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Externals/Eagle/lib/Eagle1.0/vendor.eagle.

349
350
351
352
353
354
355

356
357
358
359
360
361
362
363
364
365
366
367
 
    #
    # NOTE: Check for any overridden settings that may have been specified via
    #       the command line, etc.
    #
    checkForTestOverrides stdout [expr {[info exists test_overrides] ? \
        $test_overrides : [list binary_directory build_base_directory \

        build_directory common_directory connection_flags database_directory \
        datetime_format define_constant_prefix execute_on_setup \
        interop_assembly_file_names native_library_file_names release_version \
        scratch_directory temporary_directory test_clr test_clr_v2 \
        test_clr_v4 test_configuration test_configurations test_constraints \
        test_machine test_net_fx test_net_fx_2005 test_net_fx_2008 \
        test_net_fx_2010 test_net_fx_2012 test_net_fx_2013 test_net_fx_2015 \
        test_overrides test_platform test_suite test_year test_years \
        test_year_clr_v2 test_year_clr_v4 vendor_directory \
        vendor_test_directory]}] [checkForVendorQuiet checkForTestOverrides]

    #







>
|
|
|
|
|







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
 
    #
    # NOTE: Check for any overridden settings that may have been specified via
    #       the command line, etc.
    #
    checkForTestOverrides stdout [expr {[info exists test_overrides] ? \
        $test_overrides : [list binary_directory build_base_directory \
        build_directory common_directory compile_option_prefix \
        connection_flags database_directory datetime_format \
        define_constant_prefix execute_on_setup interop_assembly_file_names \
        native_library_file_names release_version scratch_directory \
        temporary_directory test_clr test_clr_v2 test_clr_v4 \
        test_configuration test_configurations test_constraints \
        test_machine test_net_fx test_net_fx_2005 test_net_fx_2008 \
        test_net_fx_2010 test_net_fx_2012 test_net_fx_2013 test_net_fx_2015 \
        test_overrides test_platform test_suite test_year test_years \
        test_year_clr_v2 test_year_clr_v4 vendor_directory \
        vendor_test_directory]}] [checkForVendorQuiet checkForTestOverrides]

    #

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

32
33
34
35
36
37
38



















39
40
41
42
43





44
45
46
47
48
49
50
....
1952
1953
1954
1955
1956
1957
1958
















































1959
1960
1961
1962
1963
1964
1965
....
4872
4873
4874
4875
4876
4877
4878


















4879
4880
4881
4882
4883
4884
4885











4886
4887
4888


4889
4890
4891
4892
4893
4894
4895
      } else {
        #
        # NOTE: Use the default define constant prefix.
        #
        return defineConstant.System.Data.SQLite.
      }
    }



















 
    proc haveSQLiteDefineConstant { name } {
      return [haveConstraint \
          [appendArgs [getSQLiteDefineConstantPrefix] $name]]
    }





 
    proc getBuildYear {} {
      #
      # NOTE: See if the "year" setting has been overridden by the user (e.g.
      #       on the command line).  This helps control exactly which set of
      #       binaries we are testing, those produced using the Visual Studio
      #       2005, 2008, 2010, 2012, 2013, 2015, or 2017 build systems.  To
................................................................................
        if {[lsearch -exact -nocase $defineConstants $name] != -1} then {
          #
          # NOTE: Yes, this define constant was enabled when the managed
          #       assembly was compiled.
          #
          addConstraint [appendArgs [getSQLiteDefineConstantPrefix] $name]

















































          tputs $channel yes\n
        } else {
          tputs $channel no\n
        }
      } else {
        tputs $channel error\n
      }
................................................................................
          #
          # NOTE: Check if the compile-time option is listed in the list of
          #       "define constants" kept track of by the managed assembly.
          #
          checkForSQLiteDefineConstant $::test_channel $defineConstant
        }



















        #
        # NOTE: Check if the System.Data.SQLite provider was compiled with
        #       support for any encrypted databases.
        #
        if {[haveSQLiteDefineConstant INTEROP_CODEC] || \
            [haveSQLiteDefineConstant INTEROP_INCLUDE_SEE]} then {
          #











          # NOTE: Yes, add generic constraint for use by the test suite.
          #
          addConstraint System.Data.SQLite.Encryption


        }

        #
        # NOTE: Check the current build year.  Basically, this indicates
        #       which version of MSBuild and/or Visual Studio was used to
        #       compile the assembly binaries under test.
        #







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>





>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







>
>
>
>
>
>
>
>
>
>
>
|
|
|
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
....
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
....
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
      } else {
        #
        # NOTE: Use the default define constant prefix.
        #
        return defineConstant.System.Data.SQLite.
      }
    }
 
    proc getSQLiteCompileOptionPrefix {} {
      #
      # NOTE: See if the compile option prefix setting has been overridden
      #       by the user (e.g. on the command line).
      #
      if {[info exists ::compile_option_prefix] && \
          [string length $::compile_option_prefix] > 0} then {
        #
        # NOTE: Use the specified compile option prefix.
        #
        return $::compile_option_prefix
      } else {
        #
        # NOTE: Use the default compile option prefix.
        #
        return compileOption.SQLite.
      }
    }
 
    proc haveSQLiteDefineConstant { name } {
      return [haveConstraint \
          [appendArgs [getSQLiteDefineConstantPrefix] $name]]
    }
 
    proc haveSQLiteCompileOption { name } {
      return [haveConstraint \
          [appendArgs [getSQLiteCompileOptionPrefix] $name]]
    }
 
    proc getBuildYear {} {
      #
      # NOTE: See if the "year" setting has been overridden by the user (e.g.
      #       on the command line).  This helps control exactly which set of
      #       binaries we are testing, those produced using the Visual Studio
      #       2005, 2008, 2010, 2012, 2013, 2015, or 2017 build systems.  To
................................................................................
        if {[lsearch -exact -nocase $defineConstants $name] != -1} then {
          #
          # NOTE: Yes, this define constant was enabled when the managed
          #       assembly was compiled.
          #
          addConstraint [appendArgs [getSQLiteDefineConstantPrefix] $name]

          tputs $channel yes\n
        } else {
          tputs $channel no\n
        }
      } else {
        tputs $channel error\n
      }
    }
 
    proc checkForSQLiteCompileOption { channel name } {
      tputs $channel [appendArgs \
          "---- checking for SQLite interop assembly compile option \"" \
          $name "\"... "]

      if {[catch {
        object invoke -flags +NonPublic \
            System.Data.SQLite.SQLite3 InteropCompileOptions
      } compileOptions] == 0} then {
        if {[lsearch -exact -nocase $compileOptions $name] != -1} then {
          #
          # NOTE: Yes, this compile option was enabled when the interop
          #       assembly was compiled.
          #
          addConstraint [appendArgs [getSQLiteCompileOptionPrefix] $name]

          tputs $channel yes\n
        } else {
          tputs $channel no\n
        }
      } else {
        tputs $channel error\n
      }

      tputs $channel [appendArgs \
          "---- checking for SQLite core library compile option \"" \
          $name "\"... "]

      if {[catch {
        object invoke -flags +NonPublic \
            System.Data.SQLite.SQLite3 SQLiteCompileOptions
      } compileOptions] == 0} then {
        if {[lsearch -exact -nocase $compileOptions $name] != -1} then {
          #
          # NOTE: Yes, this compile option was enabled when the SQLite
          #       core library was compiled.
          #
          addConstraint [appendArgs [getSQLiteCompileOptionPrefix] $name]

          tputs $channel yes\n
        } else {
          tputs $channel no\n
        }
      } else {
        tputs $channel error\n
      }
................................................................................
          #
          # NOTE: Check if the compile-time option is listed in the list of
          #       "define constants" kept track of by the managed assembly.
          #
          checkForSQLiteDefineConstant $::test_channel $defineConstant
        }

        #
        # NOTE: Attempt to determine if various compile-time options needed for
        #       test constraints were enabled for the interop assembly and/or
        #       for the SQLite core library.
        #
        foreach compileOption [list \
            CODEC EXTENSION_FUNCTIONS HAS_CODEC INCLUDE_CEROD INCLUDE_EXTRA \
            INCLUDE_SEE INCLUDE_ZIPVFS JSON1_EXTENSION LEGACY_CLOSE LOG \
            PERCENTILE_EXTENSION REGEXP_EXTENSION SESSION_EXTENSION \
            SHA1_EXTENSION TEST_EXTENSION TOTYPE_EXTENSION VIRTUAL_TABLE] {
          #
          # NOTE: Check if the compile-time option is listed in the list
          #       kept track of by the interop assembly and/or the SQLite
          #       core library.
          #
          checkForSQLiteCompileOption $::test_channel $compileOption
        }

        #
        # NOTE: Check if the System.Data.SQLite provider was compiled with
        #       support for any encrypted databases.
        #
        if {[haveSQLiteDefineConstant INTEROP_CODEC] || \
            [haveSQLiteDefineConstant INTEROP_INCLUDE_SEE]} then {
          #
          # NOTE: Now check if the interop assembly was also compiled with
          #       support for encrypted databases.
          #
          if {[haveSQLiteCompileOption CODEC] || \
              [haveSQLiteCompileOption INCLUDE_SEE]} then {
            #
            # NOTE: Finally, check if the SQLite core library was compiled
            #       with support for encrypted databases.
            #
            if {[haveSQLiteCompileOption HAS_CODEC]} then {
              #
              # NOTE: Yes, add constraint for use by the test suite.
              #
              addConstraint System.Data.SQLite.Encryption
            }
          }
        }

        #
        # NOTE: Check the current build year.  Basically, this indicates
        #       which version of MSBuild and/or Visual Studio was used to
        #       compile the assembly binaries under test.
        #