System.Data.SQLite
Check-in [5017305c0d]
Not logged in

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

Overview
Comment:Minor revisions to the test for ticket [0e48e80333].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5017305c0d364edaa62bf409f91644f186b77687
User & Date: mistachkin 2018-01-22 22:28:09
Context
2018-01-23
00:44
Update the Eagle shell configuration file. check-in: f722d13e2d user: mistachkin tags: trunk
2018-01-22
22:28
Minor revisions to the test for ticket [0e48e80333]. check-in: 5017305c0d user: mistachkin tags: trunk
20:04
Pickup the SQLite core library 3.22.0 docs from upstream. check-in: ab8e950457 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/tkt-0e48e80333.eagle.

18
19
20
21
22
23
24


25
26
27
28
29
30
31
..
77
78
79
80
81
82
83

84
85
86
87
88
89
90
...
101
102
103
104
105
106
107


108
109
110
111
112
113
114
115
116

117
118
119
120
121
122
123
...
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
...
273
274
275
276
277
278
279
280

281
282
283
284
285
286
287
...
294
295
296
297
298
299
300
301

302
303
304
305
306
307
308
309
310
package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-0e48e80333-1.1 {unhook delegates on pooled close} -setup {
  moveEagleShellMdaConfig false


  saveMdaConfigEnvironment
} -body {
  set configFileName [writeEagleShellMdaConfig [string trim {
    <?xml version="1.0" encoding="UTF-8" ?>
    <mdaConfig xmlns="http://schemas.microsoft.com/CLR/2004/10/mda">
      <assistants>
        <callbackOnCollectedDelegate listSize="50" />
................................................................................
    if {$::result eq [lrepeat $count $sql False]} then {
      exit Success
    } else {
      exit Failure
    }
  }]


  set env(COMPLUS_MDA) 1; # enable MDA config file.

  set code [catch {
    execTestShell [list \
        -eventflags Wait -success Success -stdout output] \
        -preInitialize [appendArgs \" "set no(logFileName) 1" \"] \
        -file [appendArgs \" $scriptFileName \"] \
................................................................................

  catch {file delete $scriptFileName}
  catch {file delete $configFileName}

  unset -nocomplain code output error scriptFileName configFileName

  restoreMdaConfigEnvironment


  moveEagleShellMdaConfig true
} -constraints {eagle dotNet testExec command.object monoBug28 command.sql\
compile.DATA SQLite System.Data.SQLite} -result {0}}

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

runTest {test tkt-0e48e80333-1.2 {delegate MDA on pooled close} -setup {
  moveEagleShellMdaConfig false
  saveEnvironmentVariables [list checkForVendorQuiet]

  saveMdaConfigEnvironment

  setupDb [set fileName tkt-0e48e80333-1.2.db]
} -body {
  set configFileName [writeEagleShellMdaConfig [string trim {
    <?xml version="1.0" encoding="UTF-8" ?>
    <mdaConfig xmlns="http://schemas.microsoft.com/CLR/2004/10/mda">
................................................................................
          object invoke _Dynamic${id}.Test${id} Main
        } result] : [set result ""]}] $result \
        [expr {$code eq "Ok" ? [catch {
          object invoke _Dynamic${id}.Test${id} ThreadedPoolTraceTest
        } result] : [set result ""]}] $result]
  }]

  set env(checkForVendorQuiet) 1
  set env(COMPLUS_MDA) 1; # enable MDA config file.

  set code [catch {
    execTestShell [list \
        -eventflags Wait -success Success -stdout output] \
        -preInitialize [appendArgs \" "set fileName {" $fileName }\"] \
        -preInitialize [appendArgs \" "set no(logFileName) 1" \"] \
................................................................................
        -logFile [appendArgs \" [getTestLog] \"]
  } error]

  tlog "---- BEGIN STDOUT OUTPUT\n"
  tlog $output
  tlog "\n---- END STDOUT OUTPUT\n"

  set error [string trim $error]


  if {![regexp -- {0 (\d+)$} $error dummy count]} then {
    set count <unknown>
  }

  tputs $test_channel [appendArgs \
      "---- executed a total of " $count " queries\n"]
................................................................................
  catch {file delete $configFileName}

  unset -nocomplain dummy count
  unset -nocomplain code output error scriptFileName configFileName
  unset -nocomplain db fileName

  restoreMdaConfigEnvironment
  restoreEnvironmentVariables [list checkForVendorQuiet]

  moveEagleShellMdaConfig true
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite compileCSharp} -match regexp -result {^0 \{Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} 0 \d+\}$}}

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

runSQLiteTestEpilogue
runTestEpilogue







>
>







 







>







 







>
>








|
>







 







|







 







|
>







 







|
>









18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
...
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
...
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
...
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
package require System.Data.SQLite.Test
runSQLiteTestPrologue

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

runTest {test tkt-0e48e80333-1.1 {unhook delegates on pooled close} -setup {
  moveEagleShellMdaConfig false

  saveEagleShellEnvironment
  saveMdaConfigEnvironment
} -body {
  set configFileName [writeEagleShellMdaConfig [string trim {
    <?xml version="1.0" encoding="UTF-8" ?>
    <mdaConfig xmlns="http://schemas.microsoft.com/CLR/2004/10/mda">
      <assistants>
        <callbackOnCollectedDelegate listSize="50" />
................................................................................
    if {$::result eq [lrepeat $count $sql False]} then {
      exit Success
    } else {
      exit Failure
    }
  }]

  set env(NoMutexes) 1; # ignore Eagle mutexes.
  set env(COMPLUS_MDA) 1; # enable MDA config file.

  set code [catch {
    execTestShell [list \
        -eventflags Wait -success Success -stdout output] \
        -preInitialize [appendArgs \" "set no(logFileName) 1" \"] \
        -file [appendArgs \" $scriptFileName \"] \
................................................................................

  catch {file delete $scriptFileName}
  catch {file delete $configFileName}

  unset -nocomplain code output error scriptFileName configFileName

  restoreMdaConfigEnvironment
  restoreEagleShellEnvironment

  moveEagleShellMdaConfig true
} -constraints {eagle dotNet testExec command.object monoBug28 command.sql\
compile.DATA SQLite System.Data.SQLite} -result {0}}

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

runTest {test tkt-0e48e80333-1.2 {delegate MDA on pooled close} -setup {
  moveEagleShellMdaConfig false

  saveEagleShellEnvironment
  saveMdaConfigEnvironment

  setupDb [set fileName tkt-0e48e80333-1.2.db]
} -body {
  set configFileName [writeEagleShellMdaConfig [string trim {
    <?xml version="1.0" encoding="UTF-8" ?>
    <mdaConfig xmlns="http://schemas.microsoft.com/CLR/2004/10/mda">
................................................................................
          object invoke _Dynamic${id}.Test${id} Main
        } result] : [set result ""]}] $result \
        [expr {$code eq "Ok" ? [catch {
          object invoke _Dynamic${id}.Test${id} ThreadedPoolTraceTest
        } result] : [set result ""]}] $result]
  }]

  set env(NoMutexes) 1; # ignore Eagle mutexes.
  set env(COMPLUS_MDA) 1; # enable MDA config file.

  set code [catch {
    execTestShell [list \
        -eventflags Wait -success Success -stdout output] \
        -preInitialize [appendArgs \" "set fileName {" $fileName }\"] \
        -preInitialize [appendArgs \" "set no(logFileName) 1" \"] \
................................................................................
        -logFile [appendArgs \" [getTestLog] \"]
  } error]

  tlog "---- BEGIN STDOUT OUTPUT\n"
  tlog $output
  tlog "\n---- END STDOUT OUTPUT\n"

  set error [lindex \
      [split [string map [list \r\n \n] [string trim $error]] \n] end]

  if {![regexp -- {0 (\d+)$} $error dummy count]} then {
    set count <unknown>
  }

  tputs $test_channel [appendArgs \
      "---- executed a total of " $count " queries\n"]
................................................................................
  catch {file delete $configFileName}

  unset -nocomplain dummy count
  unset -nocomplain code output error scriptFileName configFileName
  unset -nocomplain db fileName

  restoreMdaConfigEnvironment
  restoreEagleShellEnvironment

  moveEagleShellMdaConfig true
} -constraints {eagle command.object monoBug28 command.sql compile.DATA SQLite\
System.Data.SQLite compileCSharp} -match regexp -result {^0 \{Ok\
System#CodeDom#Compiler#CompilerResults#\d+ \{\} 0 \{\} 0 \d+\}$}}

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

runSQLiteTestEpilogue
runTestEpilogue

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

3079
3080
3081
3082
3083
3084
3085












3086
3087
3088
3089
3090
3091
3092
      # NOTE: This is self-cleaning.  If no saved environment variables now
      #       exist, remove the array.
      #
      if {[array size savedEnv] == 0} then {
        unset -nocomplain savedEnv
      }
    }












 
    proc saveMdaConfigEnvironment {} {
      upvar 1 savedEnv savedEnv

      saveEnvironmentVariables [list COMPLUS_MDA] savedEnv
    }
 







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







3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
      # NOTE: This is self-cleaning.  If no saved environment variables now
      #       exist, remove the array.
      #
      if {[array size savedEnv] == 0} then {
        unset -nocomplain savedEnv
      }
    }
 
    proc saveEagleShellEnvironment {} {
      upvar 1 savedEnv savedEnv

      saveEnvironmentVariables [list NoMutexes] savedEnv
    }
 
    proc restoreEagleShellEnvironment {} {
      upvar 1 savedEnv savedEnv

      restoreEnvironmentVariables [list NoMutexes] savedEnv
    }
 
    proc saveMdaConfigEnvironment {} {
      upvar 1 savedEnv savedEnv

      saveEnvironmentVariables [list COMPLUS_MDA] savedEnv
    }