System.Data.SQLite

Check-in [df2f4392a1]
Login

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

Overview
Comment:Initial test suite changes for EF6 (incomplete).
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | ef6
Files: files | file ages | folders
SHA1: df2f4392a1dd2a3ae8140b948cf38e01926a8902
User & Date: mistachkin 2014-01-10 23:58:37.215
Context
2014-01-10
23:58
Design-time installer changes for EF6. check-in: 5b9a231104 user: mistachkin tags: ef6
23:58
Initial test suite changes for EF6 (incomplete). check-in: df2f4392a1 user: mistachkin tags: ef6
23:58
NuGet packaging changes for EF6. check-in: 6d41ae1d66 user: mistachkin tags: ef6
Changes
Unified Diff Ignore Whitespace Patch
Changes to Tests/common.eagle.
2364
2365
2366
2367
2368
2369
2370
2371

2372
2373
2374
2375
2376
2377
2378
        set nativeFileNames [list \
            sqlite3.dll 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]


        #
        # 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 {







|
>







2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
        set nativeFileNames [list \
            sqlite3.dll 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 \
            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 {
2527
2528
2529
2530
2531
2532
2533

2534
2535
2536
2537
2538
2539
2540
          #
          # NOTE: Skip trying to load any files if instructed.
          #
          if {![info exists ::no(loadSqliteFiles)]} then {
            if {![info exists ::no(loadSqliteImplicitFiles)]} then {
              tryLoadAssembly System.Data.SQLite.dll
              tryLoadAssembly System.Data.SQLite.Linq.dll

            }

            if {![info exists ::no(loadSqliteNonImplicitFiles)]} then {
              if {![info exists ::no(loadSqlitePlatformFiles)] && \
                  [string length $platform] > 0} then {
                tryLoadAssembly System.Data.SQLite.dll $platform
              }







>







2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
          #
          # NOTE: Skip trying to load any files if instructed.
          #
          if {![info exists ::no(loadSqliteFiles)]} then {
            if {![info exists ::no(loadSqliteImplicitFiles)]} then {
              tryLoadAssembly System.Data.SQLite.dll
              tryLoadAssembly System.Data.SQLite.Linq.dll
              tryLoadAssembly System.Data.SQLite.EF6.dll
            }

            if {![info exists ::no(loadSqliteNonImplicitFiles)]} then {
              if {![info exists ::no(loadSqlitePlatformFiles)] && \
                  [string length $platform] > 0} then {
                tryLoadAssembly System.Data.SQLite.dll $platform
              }
2592
2593
2594
2595
2596
2597
2598






2599
2600
2601
2602
2603
2604
2605
        }

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







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







>
>
>
>
>
>







2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
        }

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

        catch {
          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 {
          catch {
            tputs $::test_channel [appendArgs \
                "---- file version of \"" $platform \
                "/sqlite3.dll\"... " [file version \
                [getBinaryFileName sqlite3.dll $platform]] \n]
Changes to Tests/version.eagle.
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
75
76

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.
#
set systemDataSQLiteDllFile [getBuildFileName System.Data.SQLite.dll]
set systemDataSQLiteLinqDllFile [getBuildFileName System.Data.SQLite.Linq.dll]

set sqliteDesignerDllFile [getBuildFileName SQLite.Designer.dll]
set testExeFile [getBuildFileName test.exe]
set testLinqExeFile [getBuildFileName testlinq.exe]

#
# NOTE: Setup the test constraints specific to the tests in this file.
#
if {![haveConstraint [appendArgs file_ \
    [file tail $systemDataSQLiteDllFile]]]} then {
  checkForFile $test_channel $systemDataSQLiteDllFile
}

if {![haveConstraint [appendArgs file_ \
    [file tail $systemDataSQLiteLinqDllFile]]]} then {
  checkForFile $test_channel $systemDataSQLiteLinqDllFile
}






if {![haveConstraint [appendArgs file_ \
    [file tail $sqliteDesignerDllFile]]]} then {
  checkForFile $test_channel $sqliteDesignerDllFile
}

if {![haveConstraint [appendArgs file_ [file tail $testExeFile]]]} then {







>
















>
>
>
>
>







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
75
76
77
78
79
80
81
82

#
# NOTE: Setup the variables that refer to the various files required by the
#       tests in this file.
#
set systemDataSQLiteDllFile [getBuildFileName System.Data.SQLite.dll]
set systemDataSQLiteLinqDllFile [getBuildFileName System.Data.SQLite.Linq.dll]
set systemDataSQLiteEF6DllFile [getBuildFileName System.Data.SQLite.EF6.dll]
set sqliteDesignerDllFile [getBuildFileName SQLite.Designer.dll]
set testExeFile [getBuildFileName test.exe]
set testLinqExeFile [getBuildFileName testlinq.exe]

#
# NOTE: Setup the test constraints specific to the tests in this file.
#
if {![haveConstraint [appendArgs file_ \
    [file tail $systemDataSQLiteDllFile]]]} then {
  checkForFile $test_channel $systemDataSQLiteDllFile
}

if {![haveConstraint [appendArgs file_ \
    [file tail $systemDataSQLiteLinqDllFile]]]} then {
  checkForFile $test_channel $systemDataSQLiteLinqDllFile
}

if {![haveConstraint [appendArgs file_ \
    [file tail $systemDataSQLiteEF6DllFile]]]} then {
  checkForFile $test_channel $systemDataSQLiteEF6DllFile
}

if {![haveConstraint [appendArgs file_ \
    [file tail $sqliteDesignerDllFile]]]} then {
  checkForFile $test_channel $sqliteDesignerDllFile
}

if {![haveConstraint [appendArgs file_ [file tail $testExeFile]]]} then {
113
114
115
116
117
118
119

















120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_System.Data.SQLite.Linq.dll} -result $version(full)}

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


















runTest {test version-1.5 {'SQLite.Designer' binary version} -body {
  file version $sqliteDesignerDllFile
} -constraints {eagle file_SQLite.Designer.dll} -result $version(full)}

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

runTest {test version-1.6 {'SQLite.Designer' assembly version} -body {
  set assemblyName [object invoke -alias System.Reflection.AssemblyName \
      GetAssemblyName $sqliteDesignerDllFile]

  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_SQLite.Designer.dll} -result $version(full)}

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

runTest {test version-1.7 {'test' binary version} -body {
  file version $testExeFile
} -constraints {eagle file_test.exe} -result $version(full)}

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

runTest {test version-1.8 {'test' assembly version} -body {
  set assemblyName [object invoke -alias System.Reflection.AssemblyName \
      GetAssemblyName $testExeFile]

  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_test.exe} -result $version(full)}

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

runTest {test version-1.9 {'testlinq' binary version} -body {
  file version $testLinqExeFile
} -constraints {eagle file_testlinq.exe} -result $version(full)}

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

runTest {test version-1.10 {'testlinq' assembly version} -body {
  set assemblyName [object invoke -alias System.Reflection.AssemblyName \
      GetAssemblyName $testLinqExeFile]

  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_testlinq.exe} -result $version(full)}

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

runTest {test version-1.11 {SQLiteVersion} -body {
  object invoke System.Data.SQLite.SQLiteConnection SQLiteVersion
} -constraints {eagle SQLite System.Data.SQLite} -match regexp -result \
{^\d+\.\d+\.\d+(?:\.\d+)?$}}

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

runTest {test version-1.12 {SQLiteSourceId} -body {
  object invoke System.Data.SQLite.SQLiteConnection SQLiteSourceId
} -constraints {eagle SQLite System.Data.SQLite} -match regexp -result \
{^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}$}}

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

runTest {test version-1.13 {InteropVersion} -body {
  object invoke System.Data.SQLite.SQLiteConnection InteropVersion
} -constraints {eagle SQLiteInterop System.Data.SQLite} -result $version(full)}

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

runTest {test version-1.14 {InteropSourceId} -body {
  object invoke System.Data.SQLite.SQLiteConnection InteropSourceId
} -constraints {eagle SQLiteInterop System.Data.SQLite} -match regexp -result \
{^[0-9a-f]{40} \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC$}}

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

runTest {test version-1.15 {ProviderVersion} -body {
  object invoke System.Data.SQLite.SQLiteConnection ProviderVersion
} -constraints {eagle System.Data.SQLite} -result $version(full)}

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

runTest {test version-1.16 {ProviderSourceId} -body {
  #
  # NOTE: The ProviderSourceId property value may be null, which
  #       would result in an empty string being returned here.
  #
  object invoke System.Data.SQLite.SQLiteConnection ProviderSourceId
} -constraints {eagle System.Data.SQLite} -match regexp -result \
{^(?:|[0-9a-f]{40} \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC)$}}







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





|










|





|










|





|










|






|






|





|






|





|







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_System.Data.SQLite.Linq.dll} -result $version(full)}

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

runTest {test version-1.5 {'System.Data.SQLite.EF6' binary version} -body {
  file version $systemDataSQLiteEF6DllFile
} -constraints {eagle file_System.Data.SQLite.EF6.dll} -result $version(full)}

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

runTest {test version-1.6 {'System.Data.SQLite.EF6' assembly version} -body {
  set assemblyName [object invoke -alias System.Reflection.AssemblyName \
      GetAssemblyName $systemDataSQLiteEF6DllFile]

  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_System.Data.SQLite.EF6.dll} -result $version(full)}

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

runTest {test version-1.7 {'SQLite.Designer' binary version} -body {
  file version $sqliteDesignerDllFile
} -constraints {eagle file_SQLite.Designer.dll} -result $version(full)}

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

runTest {test version-1.8 {'SQLite.Designer' assembly version} -body {
  set assemblyName [object invoke -alias System.Reflection.AssemblyName \
      GetAssemblyName $sqliteDesignerDllFile]

  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_SQLite.Designer.dll} -result $version(full)}

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

runTest {test version-1.9 {'test' binary version} -body {
  file version $testExeFile
} -constraints {eagle file_test.exe} -result $version(full)}

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

runTest {test version-1.10 {'test' assembly version} -body {
  set assemblyName [object invoke -alias System.Reflection.AssemblyName \
      GetAssemblyName $testExeFile]

  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_test.exe} -result $version(full)}

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

runTest {test version-1.11 {'testlinq' binary version} -body {
  file version $testLinqExeFile
} -constraints {eagle file_testlinq.exe} -result $version(full)}

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

runTest {test version-1.12 {'testlinq' assembly version} -body {
  set assemblyName [object invoke -alias System.Reflection.AssemblyName \
      GetAssemblyName $testLinqExeFile]

  $assemblyName Version.ToString
} -cleanup {
  unset -nocomplain assemblyName
} -constraints {eagle file_testlinq.exe} -result $version(full)}

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

runTest {test version-1.13 {SQLiteVersion} -body {
  object invoke System.Data.SQLite.SQLiteConnection SQLiteVersion
} -constraints {eagle SQLite System.Data.SQLite} -match regexp -result \
{^\d+\.\d+\.\d+(?:\.\d+)?$}}

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

runTest {test version-1.14 {SQLiteSourceId} -body {
  object invoke System.Data.SQLite.SQLiteConnection SQLiteSourceId
} -constraints {eagle SQLite System.Data.SQLite} -match regexp -result \
{^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} [0-9a-f]{40}$}}

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

runTest {test version-1.15 {InteropVersion} -body {
  object invoke System.Data.SQLite.SQLiteConnection InteropVersion
} -constraints {eagle SQLiteInterop System.Data.SQLite} -result $version(full)}

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

runTest {test version-1.16 {InteropSourceId} -body {
  object invoke System.Data.SQLite.SQLiteConnection InteropSourceId
} -constraints {eagle SQLiteInterop System.Data.SQLite} -match regexp -result \
{^[0-9a-f]{40} \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC$}}

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

runTest {test version-1.17 {ProviderVersion} -body {
  object invoke System.Data.SQLite.SQLiteConnection ProviderVersion
} -constraints {eagle System.Data.SQLite} -result $version(full)}

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

runTest {test version-1.18 {ProviderSourceId} -body {
  #
  # NOTE: The ProviderSourceId property value may be null, which
  #       would result in an empty string being returned here.
  #
  object invoke System.Data.SQLite.SQLiteConnection ProviderSourceId
} -constraints {eagle System.Data.SQLite} -match regexp -result \
{^(?:|[0-9a-f]{40} \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} UTC)$}}
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351

352
353
354
355
356
357
  set constraint [string map [list / _ \\ _] $fileName]
  set fileName [file join $root_path $fileName]

  if {![haveConstraint [appendArgs file_ $constraint]]} then {
    checkForFile $test_channel $fileName $constraint
  }

  runTest {test [appendArgs version-1.17. $i] \
      [appendArgs "pattern {" $pattern "} in file \"" $fileName \"] -body {
    regexp -- $pattern [readFile $fileName]
  } -constraints [list eagle [appendArgs file_ $constraint]] -result {1}}
}

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

unset -nocomplain constraint fileName pattern fileNames patterns i version

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

unset -nocomplain testLinqExeFile testExeFile sqliteDesignerDllFile \

    systemDataSQLiteLinqDllFile systemDataSQLiteDllFile

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

runSQLiteTestEpilogue
runTestEpilogue







|












>
|





355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
  set constraint [string map [list / _ \\ _] $fileName]
  set fileName [file join $root_path $fileName]

  if {![haveConstraint [appendArgs file_ $constraint]]} then {
    checkForFile $test_channel $fileName $constraint
  }

  runTest {test [appendArgs version-1.19. $i] \
      [appendArgs "pattern {" $pattern "} in file \"" $fileName \"] -body {
    regexp -- $pattern [readFile $fileName]
  } -constraints [list eagle [appendArgs file_ $constraint]] -result {1}}
}

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

unset -nocomplain constraint fileName pattern fileNames patterns i version

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

unset -nocomplain testLinqExeFile testExeFile sqliteDesignerDllFile \
    systemDataSQLiteEF6DllFile systemDataSQLiteLinqDllFile \
    systemDataSQLiteDllFile

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

runSQLiteTestEpilogue
runTestEpilogue