System.Data.SQLite
Check-in [4744c835cb]
Not logged in

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

Overview
Comment:Another test portability enhancement for Mono.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4744c835cbc3a2765847f694c0ca97c6283a412f
User & Date: mistachkin 2016-03-22 13:38:38
Context
2016-03-22
15:07
Limit the memory usage test to running on Windows. check-in: 4445d7b93d user: mistachkin tags: trunk
13:38
Another test portability enhancement for Mono. check-in: 4744c835cb user: mistachkin tags: trunk
04:29
Some test portability enhancements for Mono. check-in: 62d83650d5 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/authorizer.eagle.

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
...
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
                       )
                       SELECT x FROM t4;} \
    DropTable         {DROP TABLE t1;} \
    Transaction       {BEGIN; SELECT 0; COMMIT;} \
    Savepoint         {SAVEPOINT s1; RELEASE SAVEPOINT s1;} \
    Attach            {ATTACH DATABASE ':memory:' AS d1;} \
    Detach            {DETACH DATABASE d1;} \
    CreateVtable      {CREATE VIRTUAL TABLE t3 USING fts4(x TEXT);} \
    DropVtable        {DROP TABLE t3;} \
    CreateTable       {CREATE TABLE tDeny(x);}]

  foreach {name value} $sql {
    set filter $name; set data [list]
    set code [catch {sql execute $db $value} result]
    set result [extractSystemDataSQLiteExceptionMessage $result]
................................................................................
{DropTempTable {{0 DropTempTable t2 {} temp {}}} 0 0} {DropView {{0 DropView v1\
{} main {}}} 0 0} {DropTrigger {{0 DropTrigger tr1 t1 main {}}} 0 0} {DropIndex\
{{0 DropIndex i1 t1 main {}}} 0 0} {Recursive {{0 Recursive {} {} {} {}}} 0 -1}\
{DropTable {{0 DropTable t1 {} main {}}} 0 0} {Transaction {{0 Transaction\
BEGIN {} {} {}} {0 Transaction COMMIT {} {} {}}} 0 -1} {Savepoint {{0 Savepoint\
BEGIN s1 {} {}} {0 Savepoint RELEASE s1 {} {}}} 0 -1} {Attach {{0 Attach\
:memory: {} {} {}}} 0 -1} {Detach {{0 Detach d1 {} {} {}}} 0 -1} {CreateVtable\
{{0 CreateVtable t3 fts4 main {}}} 0 0} {DropVtable {{0 DropVtable t3 fts4 main\
{}}} 0 0} {CreateTable {{0 CreateTable tDeny {} main {}}} 1 {authorization\
denied -- not authorized}} False}}

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue







|







 







|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
...
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
                       )
                       SELECT x FROM t4;} \
    DropTable         {DROP TABLE t1;} \
    Transaction       {BEGIN; SELECT 0; COMMIT;} \
    Savepoint         {SAVEPOINT s1; RELEASE SAVEPOINT s1;} \
    Attach            {ATTACH DATABASE ':memory:' AS d1;} \
    Detach            {DETACH DATABASE d1;} \
    CreateVtable      {CREATE VIRTUAL TABLE t3 USING fts3(x TEXT);} \
    DropVtable        {DROP TABLE t3;} \
    CreateTable       {CREATE TABLE tDeny(x);}]

  foreach {name value} $sql {
    set filter $name; set data [list]
    set code [catch {sql execute $db $value} result]
    set result [extractSystemDataSQLiteExceptionMessage $result]
................................................................................
{DropTempTable {{0 DropTempTable t2 {} temp {}}} 0 0} {DropView {{0 DropView v1\
{} main {}}} 0 0} {DropTrigger {{0 DropTrigger tr1 t1 main {}}} 0 0} {DropIndex\
{{0 DropIndex i1 t1 main {}}} 0 0} {Recursive {{0 Recursive {} {} {} {}}} 0 -1}\
{DropTable {{0 DropTable t1 {} main {}}} 0 0} {Transaction {{0 Transaction\
BEGIN {} {} {}} {0 Transaction COMMIT {} {} {}}} 0 -1} {Savepoint {{0 Savepoint\
BEGIN s1 {} {}} {0 Savepoint RELEASE s1 {} {}}} 0 -1} {Attach {{0 Attach\
:memory: {} {} {}}} 0 -1} {Detach {{0 Detach d1 {} {} {}}} 0 -1} {CreateVtable\
{{0 CreateVtable t3 fts3 main {}}} 0 0} {DropVtable {{0 DropVtable t3 fts3 main\
{}}} 0 0} {CreateTable {{0 CreateTable tDeny {} main {}}} 1 {authorization\
denied -- not authorized}} False}}

###############################################################################

runSQLiteTestEpilogue
runTestEpilogue

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

475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
...
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
...
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
....
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
....
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
....
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
....
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
....
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
      #
      # NOTE: If the test suite cannot use [exec] or execution of CorFlags
      #       failed, return false.
      #
      return false
    }
 
    proc getCoreBinaryFileNamesOnly {} {
      #
      # NOTE: First, check if the list of native library file names has been
      #       manually overridden.
      #
      if {[info exists ::native_library_file_names] && \
          [llength $::native_library_file_names] > 0} then {
        #
................................................................................
      }

      #
      # NOTE: Build the fully qualified file name for the SQLite core
      #       library.  If this file exists, we should have everything we
      #       need.
      #
      foreach fileNameOnly [getCoreBinaryFileNamesOnly] {
        set fileName [file nativename [file join $directory \
            $architecture $fileNameOnly]]

        if {[file exists $fileName]} then {
          return true
        }

................................................................................
        return [file nativename \
            [file join [getBinaryDirectory] $platform System.Data.SQLite.dll]]
      } elseif {$standard} then {
        #
        # NOTE: Attempt to determine the native-only standard SQLite library
        #       file name for this platform and then return it.
        #
        foreach fileNameOnly [getCoreBinaryFileNamesOnly] {
          set fileName [file nativename \
              [file join [getBinaryDirectory] $platform $fileNameOnly]]

          if {[file exists $fileName]} then {
            return $fileName
          }
        }
................................................................................
            netFx461 netFx45] [getBuildNetFx]]] EntityFramework.dll]]

        #
        # NOTE: Build the list of native assembly files that we handle.  The
        #       reason the "System.Data.SQLite.dll" file is included here is
        #       because it could be the mixed-mode assembly.
        #
        set nativeFileNames [getCoreBinaryFileNamesOnly]
        lappend nativeFileNames SQLite.Interop.dll System.Data.SQLite.dll

        #
        # NOTE: Build the list of managed assembly files that we handle.
        #
        set managedFileNames [list \
            System.Data.SQLite.dll System.Data.SQLite.Linq.dll \
................................................................................
                  [string length $architecture] > 0} then {
                tryLoadAssembly System.Data.SQLite.dll $architecture
              }
            }
          }
        }

        foreach fileNameOnly [getCoreBinaryFileNamesOnly] {
          catch {
            tputs $::test_channel [appendArgs \
                "---- file version of \"" $fileNameOnly "\"... \"" \
                [file version [getBinaryFileName $fileNameOnly]] \"\n]
          }
        }

................................................................................
          tputs $::test_channel [appendArgs \
              "---- file version of \"System.Data.SQLite.EF6.dll\"... \"" \
              [file version [getBinaryFileName System.Data.SQLite.EF6.dll]] \
              \"\n]
        }

        if {[string length $platform] > 0} then {
          foreach fileNameOnly [getCoreBinaryFileNamesOnly] {
            catch {
              tputs $::test_channel [appendArgs \
                  "---- file version of \"" $platform \
                  / $fileNameOnly "\"... \"" [file version \
                  [getBinaryFileName $fileNameOnly $platform]] \"\n]
            }
          }
................................................................................
                "---- file version of \"" $platform \
                "/System.Data.SQLite.dll\"... \"" [file version \
                [getBinaryFileName System.Data.SQLite.dll $platform]] \"\n]
          }
        }

        if {[string length $architecture] > 0} then {
          foreach fileNameOnly [getCoreBinaryFileNamesOnly] {
            catch {
              tputs $::test_channel [appendArgs \
                  "---- file version of \"" $architecture \
                  / $fileNameOnly "\"... \"" [file version \
                  [getBinaryFileName $fileNameOnly $architecture]] \"\n]
            }
          }
................................................................................

          object foreach -alias module $modules {
            #
            # NOTE: The module file name here must be normalized.
            #
            set fileName [file normalize [$module FileName]]

            if {[lsearch -exact -nocase -- [getCoreBinaryFileNamesOnly] \
                [file tail $fileName]] != -1} then {
              tputs $::test_channel [appendArgs \
                  "---- found loaded SQLite native library module: " \
                  $fileName \n]
            } elseif {[string match \
                -nocase */SQLite.Interop.dll $fileName]} then {
              tputs $::test_channel [appendArgs \







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
...
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
...
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
....
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
....
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
....
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
....
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
....
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
      #
      # NOTE: If the test suite cannot use [exec] or execution of CorFlags
      #       failed, return false.
      #
      return false
    }
 
    proc getNativeLibraryFileNamesOnly {} {
      #
      # NOTE: First, check if the list of native library file names has been
      #       manually overridden.
      #
      if {[info exists ::native_library_file_names] && \
          [llength $::native_library_file_names] > 0} then {
        #
................................................................................
      }

      #
      # NOTE: Build the fully qualified file name for the SQLite core
      #       library.  If this file exists, we should have everything we
      #       need.
      #
      foreach fileNameOnly [getNativeLibraryFileNamesOnly] {
        set fileName [file nativename [file join $directory \
            $architecture $fileNameOnly]]

        if {[file exists $fileName]} then {
          return true
        }

................................................................................
        return [file nativename \
            [file join [getBinaryDirectory] $platform System.Data.SQLite.dll]]
      } elseif {$standard} then {
        #
        # NOTE: Attempt to determine the native-only standard SQLite library
        #       file name for this platform and then return it.
        #
        foreach fileNameOnly [getNativeLibraryFileNamesOnly] {
          set fileName [file nativename \
              [file join [getBinaryDirectory] $platform $fileNameOnly]]

          if {[file exists $fileName]} then {
            return $fileName
          }
        }
................................................................................
            netFx461 netFx45] [getBuildNetFx]]] EntityFramework.dll]]

        #
        # NOTE: Build the list of native assembly files that we handle.  The
        #       reason the "System.Data.SQLite.dll" file is included here is
        #       because it could be the mixed-mode assembly.
        #
        set nativeFileNames [getNativeLibraryFileNamesOnly]
        lappend nativeFileNames SQLite.Interop.dll System.Data.SQLite.dll

        #
        # NOTE: Build the list of managed assembly files that we handle.
        #
        set managedFileNames [list \
            System.Data.SQLite.dll System.Data.SQLite.Linq.dll \
................................................................................
                  [string length $architecture] > 0} then {
                tryLoadAssembly System.Data.SQLite.dll $architecture
              }
            }
          }
        }

        foreach fileNameOnly [getNativeLibraryFileNamesOnly] {
          catch {
            tputs $::test_channel [appendArgs \
                "---- file version of \"" $fileNameOnly "\"... \"" \
                [file version [getBinaryFileName $fileNameOnly]] \"\n]
          }
        }

................................................................................
          tputs $::test_channel [appendArgs \
              "---- file version of \"System.Data.SQLite.EF6.dll\"... \"" \
              [file version [getBinaryFileName System.Data.SQLite.EF6.dll]] \
              \"\n]
        }

        if {[string length $platform] > 0} then {
          foreach fileNameOnly [getNativeLibraryFileNamesOnly] {
            catch {
              tputs $::test_channel [appendArgs \
                  "---- file version of \"" $platform \
                  / $fileNameOnly "\"... \"" [file version \
                  [getBinaryFileName $fileNameOnly $platform]] \"\n]
            }
          }
................................................................................
                "---- file version of \"" $platform \
                "/System.Data.SQLite.dll\"... \"" [file version \
                [getBinaryFileName System.Data.SQLite.dll $platform]] \"\n]
          }
        }

        if {[string length $architecture] > 0} then {
          foreach fileNameOnly [getNativeLibraryFileNamesOnly] {
            catch {
              tputs $::test_channel [appendArgs \
                  "---- file version of \"" $architecture \
                  / $fileNameOnly "\"... \"" [file version \
                  [getBinaryFileName $fileNameOnly $architecture]] \"\n]
            }
          }
................................................................................

          object foreach -alias module $modules {
            #
            # NOTE: The module file name here must be normalized.
            #
            set fileName [file normalize [$module FileName]]

            if {[lsearch -exact -nocase -- [getNativeLibraryFileNamesOnly] \
                [file tail $fileName]] != -1} then {
              tputs $::test_channel [appendArgs \
                  "---- found loaded SQLite native library module: " \
                  $fileName \n]
            } elseif {[string match \
                -nocase */SQLite.Interop.dll $fileName]} then {
              tputs $::test_channel [appendArgs \