System.Data.SQLite
Check-in [7bc6c13445]
Not logged in

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

Overview
Comment:More fine-tuning of script library / test suite integration.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7bc6c134456f302bc54f42c18c7dcf6d14eaba3c
User & Date: mistachkin 2015-04-09 04:53:37
Context
2015-04-21
18:18
Improve ADO.NET conformance of the SQLiteDataReader.RecordsAffected property. Fix for [74542e702e]. check-in: 68239f46ea user: mistachkin tags: trunk
2015-04-09
04:53
More fine-tuning of script library / test suite integration. check-in: 7bc6c13445 user: mistachkin tags: trunk
01:50
Improve comments and diagnostic message from the previous check-in. check-in: 3a7cd19856 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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

810
811
812
813
814
815
816
817
818
819
820









821
822
823
824
825
826
827



828
829
830
831
832
833
834
      # NOTE: Returns non-zero if the logged on user has full administrator
      #       rights on this machine.
      #
      return [expr {[info exists ::eagle_platform(administrator)] && \
          $::eagle_platform(administrator)}]
    }
 
    proc hasRuntimeOption { name } {
      #
      # NOTE: Returns non-zero if the specified runtime option is set.
      #









      if {[catch {
        object invoke Interpreter.GetActive HasRuntimeOption $name
      } result] == 0} then {
        return $result
      } else {
        return false
      }



    }
 
    proc getPluginFlags { pattern } {
      foreach loaded [info loaded] {
        set plugin [lindex $loaded end]

        if {[regexp -- $pattern $plugin]} then {







|



>
>
>
>
>
>
>
>
>
|
|
|
|
<
<
|
>
>
>







810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833


834
835
836
837
838
839
840
841
842
843
844
      # NOTE: Returns non-zero if the logged on user has full administrator
      #       rights on this machine.
      #
      return [expr {[info exists ::eagle_platform(administrator)] && \
          $::eagle_platform(administrator)}]
    }
 
    proc hasRuntimeOption { name {default false} } {
      #
      # NOTE: Returns non-zero if the specified runtime option is set.
      #
      if {[llength [info commands debug]] > 0} then {
        if {[llength [info subcommands debug runtimeoption]] > 0} then {
          if {[catch {debug runtimeoption has $name} result] == 0} then {
            return $result
          }
        }
      }

      if {[llength [info commands object]] > 0} then {
        if {[catch {
          object invoke Interpreter.GetActive HasRuntimeOption $name
        } result] == 0} then {
          return $result


        }
      }

      return $default
    }
 
    proc getPluginFlags { pattern } {
      foreach loaded [info loaded] {
        set plugin [lindex $loaded end]

        if {[regexp -- $pattern $plugin]} then {

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

62
63
64
65
66
67
68

69
70
71
72
73
74
75
76
...
204
205
206
207
208
209
210

211
212
213
214
215
216
217
218
...
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303

304
305
306
307
308
309
310
        uplevel 1 [list set test_overrides $varNames]
      }

      return $result
    }
 
    proc refreshAutoPath {} {

      if {[llength [info subcommands debug refreshautopath]] > 0 && \
          [catch {debug refreshautopath true}] == 0} then {
        return debug
      }

      if {[llength [info commands object]] > 0 && \
          [catch {object invoke Utility RefreshAutoPathList true}] == 0} then {
        return object
................................................................................
      #
      # NOTE: Directory not found, return failure.
      #
      return false
    }
 
    proc setupInterpreterTestPath { channel dir quiet } {

      if {[llength [info subcommands debug testpath]] > 0 && \
          [catch {debug testpath} testPath] == 0} then {
        if {$dir ne $testPath} then {
          debug testpath $dir

          if {!$quiet} then {
            catch {
              tqputs $channel [appendArgs \
................................................................................
      #       infrastructure directory and add it to the auto-path for the
      #       current interpreter.  Normally, this will also set the variable
      #       created above to point to the directory added to the auto-path;
      #       however, this will not be done if the variable was not created
      #       by us.
      #
      addTestSuiteToAutoPath stdout [expr {$have_vendor_directory ? "" : \
          "vendor_directory"}] false

      unset have_vendor_directory

      #
      # NOTE: If we actually found a vendor-specific testing infrastructure
      #       directory then modify the TestPath property of the current
      #       interpreter to point directly to it.
      #
      if {[string length $vendor_directory] > 0} then {
        setupInterpreterTestPath stdout $vendor_directory false

      }
    }

    #
    # HACK: Prevent the Eagle core test suite infrastructure from checking
    #       test constraints that are time-consuming and/or most likely to
    #       be superfluous to third-party test suites (i.e. those that are







>
|







 







>
|







 







|









|
>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
...
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
        uplevel 1 [list set test_overrides $varNames]
      }

      return $result
    }
 
    proc refreshAutoPath {} {
      if {[llength [info commands debug]] > 0 && \
          [llength [info subcommands debug refreshautopath]] > 0 && \
          [catch {debug refreshautopath true}] == 0} then {
        return debug
      }

      if {[llength [info commands object]] > 0 && \
          [catch {object invoke Utility RefreshAutoPathList true}] == 0} then {
        return object
................................................................................
      #
      # NOTE: Directory not found, return failure.
      #
      return false
    }
 
    proc setupInterpreterTestPath { channel dir quiet } {
      if {[llength [info commands debug]] > 0 && \
          [llength [info subcommands debug testpath]] > 0 && \
          [catch {debug testpath} testPath] == 0} then {
        if {$dir ne $testPath} then {
          debug testpath $dir

          if {!$quiet} then {
            catch {
              tqputs $channel [appendArgs \
................................................................................
      #       infrastructure directory and add it to the auto-path for the
      #       current interpreter.  Normally, this will also set the variable
      #       created above to point to the directory added to the auto-path;
      #       however, this will not be done if the variable was not created
      #       by us.
      #
      addTestSuiteToAutoPath stdout [expr {$have_vendor_directory ? "" : \
          "vendor_directory"}] [info exists ::env(quietAddTestSuiteToAutoPath)]

      unset have_vendor_directory

      #
      # NOTE: If we actually found a vendor-specific testing infrastructure
      #       directory then modify the TestPath property of the current
      #       interpreter to point directly to it.
      #
      if {[string length $vendor_directory] > 0} then {
        setupInterpreterTestPath stdout $vendor_directory [info exists \
            ::env(quietSetupInterpreterTestPath)]
      }
    }

    #
    # HACK: Prevent the Eagle core test suite infrastructure from checking
    #       test constraints that are time-consuming and/or most likely to
    #       be superfluous to third-party test suites (i.e. those that are

Changes to Externals/Eagle/lib/Test1.0/constraints.eagle.

1608
1609
1610
1611
1612
1613
1614

1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
....
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
....
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
....
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
....
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
....
2433
2434
2435
2436
2437
2438
2439

2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
....
2548
2549
2550
2551
2552
2553
2554

2555

2556
2557
2558
2559
2560
2561
2562
....
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
....
2606
2607
2608
2609
2610
2611
2612

2613

2614
2615
2616
2617
2618
2619
2620
....
2906
2907
2908
2909
2910
2911
2912

2913
2914
2915
2916
2917
2918
2919
2920
2921
....
3363
3364
3365
3366
3367
3368
3369

3370
3371

3372
3373
3374
3375
3376
3377
3378
3379
....
3383
3384
3385
3386
3387
3388
3389

3390
3391
3392
3393
3394
3395
3396
3397
3398
....
3402
3403
3404
3405
3406
3407
3408

3409
3410
3411
3412
3413
3414
3415
3416
3417
....
3435
3436
3437
3438
3439
3440
3441

3442
3443
3444
3445
3446
3447
3448
3449
3450
....
3500
3501
3502
3503
3504
3505
3506
3507

3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
    # NOTE: Are we allowed to do stack intensive testing?
    #
    if {![info exists ::no(stackIntensive)]} then {
      if {[isEagle]} then {
        #
        # NOTE: Attempt to query for native stack checking in Eagle.
        #

        if {[catch {object invoke -flags +NonPublic \
                Eagle._Components.Private.NativeStack CanQueryThread} \
                canQueryThread] == 0 && \
            $canQueryThread} then {
          #
          # NOTE: Yes, it appears that it is available.
          #
          addConstraint stackIntensive

          tputs $channel yes\n
        } else {
................................................................................
    #
    # NOTE: Currently, only Eagle has "interactive commands".
    #
    if {[isEagle]} then {
      #
      # NOTE: Attempt to query the interactive command names from Eagle.
      #
      if {[catch {object invoke Utility GetInteractiveCommandNames $name \
              false} names] == 0 && \
          [llength $names] > 0} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint [appendArgs interactiveCommand. $name]

        tputs $channel yes\n

................................................................................

      tputs $channel no\n
    }
 
    proc checkForStrongName { channel } {
      tputs $channel "---- checking for strong name... "

      if {[catch {object invoke Interpreter.GetActive GetStrongName} \
              strongName] == 0 && \
          [string length $strongName] > 0} then {
        #
        # NOTE: Yes, it appears that the core library was signed with a
        #       strong name key.
        #
        addConstraint strongName

        tputs $channel yes\n
................................................................................
        tlog $open; tputs $channel error\n
      }
    }
 
    proc checkForHostType { channel } {
      tputs $channel "---- checking for host type... "

      if {[set code [catch {object invoke \
              Interpreter.GetActive.Host.GetType ToString} hostType]] == 0 && \
          [string length $hostType] > 0} then {
        addConstraint [appendArgs hostType. [string map \
            [list , _ + _ & _ * _ \[ _ \] _ . _ \\ _] $hostType]]

        tputs $channel [appendArgs $hostType \n]
      } elseif {$code == 0} then {
        tputs $channel unknown\n
      } else {
................................................................................
      } appDomain] == 0 && [string length $appDomain] > 0} then {
        if {[catch {
          object invoke $appDomain IsDefaultAppDomain
        } default] != 0 || [string length $default] == 0} then {
          set default false
        }

        if {[catch {
          object invoke $appDomain Id
        } id] != 0 || [string length $id] == 0} then {
          set id unknown
        }

        if {$default} then {
          addConstraint defaultAppDomain

          tputs $channel [appendArgs "yes (" $id ")\n"]
................................................................................
 
    proc checkForThreadCulture { channel } {
      tputs $channel "---- checking for thread culture... "

      #
      # NOTE: Grab the current thread culture.
      #

      if {[catch {object invoke System.Threading.Thread.CurrentThread \
              CurrentCulture} culture] == 0 && \
          [catch {object invoke Eagle._Components.Private.FormatOps \
              CultureName $culture false} culture] == 0 && \
          [string length $culture] > 0} then {
        #
        # NOTE: The culture information is present, use it and show it.
        #
        addConstraint [appendArgs threadCulture. [string map [list - _] \
            $culture]]

        tputs $channel [appendArgs $culture \n]
................................................................................
      #       Windows Form when the X server is unavailable (e.g. on
      #       OpenBSD).
      #
      if {[isWindows] || [info exists ::env(DISPLAY)]} then {
        #
        # NOTE: Is the Windows Forms assembly available?
        #

        if {[catch {object resolve System.Windows.Forms} assembly] == 0} then {

          #
          # NOTE: Yes, it appears that it is available.
          #
          addConstraint winForms

          tputs $channel yes\n

................................................................................
        tputs $channel no\n
      }
    }
 
    proc checkForStaThread { channel } {
      tputs $channel "---- checking for STA thread... "

      if {[catch {object invoke System.Threading.Thread.CurrentThread \
              GetApartmentState} apartmentState] == 0 && \
          $apartmentState eq "STA"} then {
        #
        # NOTE: Yes, we are running in an STA thread.
        #
        addConstraint staThread

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForWindowsPresentationFoundation { channel } {
      tputs $channel "---- checking for Windows Presentation Foundation... "

      #
      # NOTE: Is the Windows Presentation Foundation available?
      #

      if {[catch {object resolve PresentationFramework} assembly] == 0} then {

        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint wpf

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForPowerShell { channel } {
      tputs $channel "---- checking for PowerShell... "

      #
      # NOTE: Can the PowerShell assembly be loaded?
      #

      if {[catch {object resolve System.Management.Automation} \
              assembly] == 0} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint powerShell

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForNativeDebugger { channel } {
      tputs $channel "---- checking for native debugger... "

      #
      # NOTE: Is the native debugger present?
      #

      if {[catch {object invoke -flags +NonPublic \
              Eagle._Components.Private.NativeOps+SafeNativeMethods \

              IsDebuggerPresent} present] == 0 && $present} then {
        #
        # NOTE: Yes, it appears that it is present.
        #
        addConstraint nativeDebugger

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForManagedDebugger { channel } {
      tputs $channel "---- checking for managed debugger... "

      #
      # NOTE: Is the managed debugger attached?
      #

      if {[catch {object invoke System.Diagnostics.Debugger IsAttached} \
              attached] == 0 && $attached} then {
        #
        # NOTE: Yes, it appears that it is attached.
        #
        addConstraint managedDebugger

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForScriptDebugger { channel } {
      tputs $channel "---- checking for script debugger... "

      #
      # NOTE: Is the script debugger available?
      #

      if {[catch {object invoke -flags +NonPublic Interpreter.GetActive \
              Debugger} debugger] == 0} then {
        #
        # NOTE: We do not own this, do not dispose it.
        #
        if {[string length $debugger] > 0} then {
          catch {object flags $debugger +NoDispose}
        }

................................................................................
 
    proc checkForScriptDebuggerInterpreter { channel } {
      tputs $channel "---- checking for script debugger interpreter... "

      #
      # NOTE: Is the script debugger interpreter available?
      #

      if {[catch {object invoke -flags +NonPublic Interpreter.GetActive \
              Debugger} debugger] == 0} then {
        #
        # NOTE: We do not own this, do not dispose it.
        #
        if {[string length $debugger] > 0} then {
          catch {object flags $debugger +NoDispose}
        }

................................................................................
        checkForTestMachine checkForTestPlatform checkForTestConfiguration \
        checkForTestSuffix checkForFile checkForPathFile checkForNativeCode \
        checkForTip127 checkForTip194 checkForTip207 checkForTip241 \
        checkForTip285 checkForTip405 checkForTip426 checkForTip429 \
        checkForTiming checkForPerformance checkForBigLists \
        checkForTimeIntensive checkForMemoryIntensive checkForStackIntensive \
        checkForInteractive checkForInteractiveCommand checkForUserInteraction \
        checkForNetwork checkForCompileOption checkForKnownCompileOptions] false false


    ###########################################################################
    ############################## END Tcl ONLY ###############################
    ###########################################################################
  }
 
  #
  # NOTE: Provide the Eagle test constraints package to the interpreter.
  #
  package provide Eagle.Test.Constraints \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}
 







>
|
|
|
<







 







|
|
|







 







|
|
|







 







|
|
|







 







<
|
|







 







>
|
|
|
|
|







 







>
|
>







 







|
|
|







 







>
|
>







 







>
|
|







 







>
|
|
>
|







 







>
|
|







 







>
|
|







 







>
|
|







 







|
>













1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618

1619
1620
1621
1622
1623
1624
1625
....
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
....
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
....
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
....
2068
2069
2070
2071
2072
2073
2074

2075
2076
2077
2078
2079
2080
2081
2082
2083
....
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
....
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
....
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
....
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
....
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
....
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
....
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
....
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
....
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
....
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
    # NOTE: Are we allowed to do stack intensive testing?
    #
    if {![info exists ::no(stackIntensive)]} then {
      if {[isEagle]} then {
        #
        # NOTE: Attempt to query for native stack checking in Eagle.
        #
        if {[catch {
          object invoke -flags +NonPublic \
              Eagle._Components.Private.NativeStack CanQueryThread
        } canQueryThread] == 0 && $canQueryThread} then {

          #
          # NOTE: Yes, it appears that it is available.
          #
          addConstraint stackIntensive

          tputs $channel yes\n
        } else {
................................................................................
    #
    # NOTE: Currently, only Eagle has "interactive commands".
    #
    if {[isEagle]} then {
      #
      # NOTE: Attempt to query the interactive command names from Eagle.
      #
      if {[catch {
        object invoke Utility GetInteractiveCommandNames $name false
      } names] == 0 && [llength $names] > 0} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint [appendArgs interactiveCommand. $name]

        tputs $channel yes\n

................................................................................

      tputs $channel no\n
    }
 
    proc checkForStrongName { channel } {
      tputs $channel "---- checking for strong name... "

      if {[catch {
        object invoke Interpreter.GetActive GetStrongName
      } strongName] == 0 && [string length $strongName] > 0} then {
        #
        # NOTE: Yes, it appears that the core library was signed with a
        #       strong name key.
        #
        addConstraint strongName

        tputs $channel yes\n
................................................................................
        tlog $open; tputs $channel error\n
      }
    }
 
    proc checkForHostType { channel } {
      tputs $channel "---- checking for host type... "

      if {[set code [catch {
        object invoke Interpreter.GetActive.Host.GetType ToString
      } hostType]] == 0 && [string length $hostType] > 0} then {
        addConstraint [appendArgs hostType. [string map \
            [list , _ + _ & _ * _ \[ _ \] _ . _ \\ _] $hostType]]

        tputs $channel [appendArgs $hostType \n]
      } elseif {$code == 0} then {
        tputs $channel unknown\n
      } else {
................................................................................
      } appDomain] == 0 && [string length $appDomain] > 0} then {
        if {[catch {
          object invoke $appDomain IsDefaultAppDomain
        } default] != 0 || [string length $default] == 0} then {
          set default false
        }


        if {[catch {object invoke $appDomain Id} id] != 0 || \
            [string length $id] == 0} then {
          set id unknown
        }

        if {$default} then {
          addConstraint defaultAppDomain

          tputs $channel [appendArgs "yes (" $id ")\n"]
................................................................................
 
    proc checkForThreadCulture { channel } {
      tputs $channel "---- checking for thread culture... "

      #
      # NOTE: Grab the current thread culture.
      #
      if {[catch {
        object invoke System.Threading.Thread.CurrentThread CurrentCulture
      } culture] == 0 && [catch {
        object invoke Eagle._Components.Private.FormatOps CultureName \
            $culture false
      } culture] == 0 && [string length $culture] > 0} then {
        #
        # NOTE: The culture information is present, use it and show it.
        #
        addConstraint [appendArgs threadCulture. [string map [list - _] \
            $culture]]

        tputs $channel [appendArgs $culture \n]
................................................................................
      #       Windows Form when the X server is unavailable (e.g. on
      #       OpenBSD).
      #
      if {[isWindows] || [info exists ::env(DISPLAY)]} then {
        #
        # NOTE: Is the Windows Forms assembly available?
        #
        if {[catch {
          object resolve System.Windows.Forms
        } assembly] == 0} then {
          #
          # NOTE: Yes, it appears that it is available.
          #
          addConstraint winForms

          tputs $channel yes\n

................................................................................
        tputs $channel no\n
      }
    }
 
    proc checkForStaThread { channel } {
      tputs $channel "---- checking for STA thread... "

      if {[catch {
        object invoke System.Threading.Thread.CurrentThread GetApartmentState
      } apartmentState] == 0 && $apartmentState eq "STA"} then {
        #
        # NOTE: Yes, we are running in an STA thread.
        #
        addConstraint staThread

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForWindowsPresentationFoundation { channel } {
      tputs $channel "---- checking for Windows Presentation Foundation... "

      #
      # NOTE: Is the Windows Presentation Foundation available?
      #
      if {[catch {
        object resolve PresentationFramework
      } assembly] == 0} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint wpf

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForPowerShell { channel } {
      tputs $channel "---- checking for PowerShell... "

      #
      # NOTE: Can the PowerShell assembly be loaded?
      #
      if {[catch {
        object resolve System.Management.Automation
      } assembly] == 0} then {
        #
        # NOTE: Yes, it appears that it is available.
        #
        addConstraint powerShell

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForNativeDebugger { channel } {
      tputs $channel "---- checking for native debugger... "

      #
      # NOTE: Is the native debugger present?
      #
      if {[catch {
        object invoke -flags +NonPublic \
            Eagle._Components.Private.NativeOps+SafeNativeMethods \
            IsDebuggerPresent
      } present] == 0 && $present} then {
        #
        # NOTE: Yes, it appears that it is present.
        #
        addConstraint nativeDebugger

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForManagedDebugger { channel } {
      tputs $channel "---- checking for managed debugger... "

      #
      # NOTE: Is the managed debugger attached?
      #
      if {[catch {
        object invoke System.Diagnostics.Debugger IsAttached
      } attached] == 0 && $attached} then {
        #
        # NOTE: Yes, it appears that it is attached.
        #
        addConstraint managedDebugger

        tputs $channel yes\n
      } else {
................................................................................
 
    proc checkForScriptDebugger { channel } {
      tputs $channel "---- checking for script debugger... "

      #
      # NOTE: Is the script debugger available?
      #
      if {[catch {
        object invoke -flags +NonPublic Interpreter.GetActive Debugger
      } debugger] == 0} then {
        #
        # NOTE: We do not own this, do not dispose it.
        #
        if {[string length $debugger] > 0} then {
          catch {object flags $debugger +NoDispose}
        }

................................................................................
 
    proc checkForScriptDebuggerInterpreter { channel } {
      tputs $channel "---- checking for script debugger interpreter... "

      #
      # NOTE: Is the script debugger interpreter available?
      #
      if {[catch {
        object invoke -flags +NonPublic Interpreter.GetActive Debugger
      } debugger] == 0} then {
        #
        # NOTE: We do not own this, do not dispose it.
        #
        if {[string length $debugger] > 0} then {
          catch {object flags $debugger +NoDispose}
        }

................................................................................
        checkForTestMachine checkForTestPlatform checkForTestConfiguration \
        checkForTestSuffix checkForFile checkForPathFile checkForNativeCode \
        checkForTip127 checkForTip194 checkForTip207 checkForTip241 \
        checkForTip285 checkForTip405 checkForTip426 checkForTip429 \
        checkForTiming checkForPerformance checkForBigLists \
        checkForTimeIntensive checkForMemoryIntensive checkForStackIntensive \
        checkForInteractive checkForInteractiveCommand checkForUserInteraction \
        checkForNetwork checkForCompileOption checkForKnownCompileOptions] \
        false false

    ###########################################################################
    ############################## END Tcl ONLY ###############################
    ###########################################################################
  }
 
  #
  # NOTE: Provide the Eagle test constraints package to the interpreter.
  #
  package provide Eagle.Test.Constraints \
    [expr {[isEagle] ? [info engine PatchLevel] : "1.0"}]
}
 

Changes to Externals/Eagle/lib/Test1.0/epilogue.eagle.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
109
110
111
112
113
114
115

116
117
118



119
120
121
122
123
124
125
  }

  #
  # NOTE: Verify that the current call frame is correct and that the
  #       interpreter call stack has not been imbalanced by previous
  #       tests or other errors.  This check only applies to Eagle.
  #
  if {[isEagle]} then {
    catch {
      #
      # NOTE: Check the name of the current call frame against the one
      #       that should be used for evaluating this script file.
      #
      if {[object invoke -flags +NonPublic \
              Interpreter.GetActive.CurrentFrame Name] ne \
................................................................................
            " microseconds\n"]
      }
    }

    #
    # NOTE: Show the ending operation count (for Eagle only).
    #

    catch {
      object invoke -flags +NonPublic Interpreter.GetActive OperationCount
    } operationCount




    tputs $test_channel [appendArgs "---- ending operation count: " \
        $operationCount \n]

    unset operationCount

    #







|







 







>
|
|
|
>
>
>







20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
  }

  #
  # NOTE: Verify that the current call frame is correct and that the
  #       interpreter call stack has not been imbalanced by previous
  #       tests or other errors.  This check only applies to Eagle.
  #
  if {[isEagle] && [llength [info commands object]] > 0} then {
    catch {
      #
      # NOTE: Check the name of the current call frame against the one
      #       that should be used for evaluating this script file.
      #
      if {[object invoke -flags +NonPublic \
              Interpreter.GetActive.CurrentFrame Name] ne \
................................................................................
            " microseconds\n"]
      }
    }

    #
    # NOTE: Show the ending operation count (for Eagle only).
    #
    if {[llength [info commands object]] > 0} then {
      catch {
        object invoke -flags +NonPublic Interpreter.GetActive OperationCount
      } operationCount
    } else {
      set operationCount unavailable
    }

    tputs $test_channel [appendArgs "---- ending operation count: " \
        $operationCount \n]

    unset operationCount

    #

Changes to Externals/Eagle/lib/Test1.0/prologue.eagle.

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
...
674
675
676
677
678
679
680

681



682
683
684
685

686



687
688
689
690
691
692
693
....
3049
3050
3051
3052
3053
3054
3055

3056
3057
3058



3059
3060
3061
3062
3063
3064
3065

  #
  # NOTE: Verify that the current call frame is correct and that the
  #       interpreter call stack has not been imbalanced by previous
  #       tests or other errors.  This check only applies to Eagle.
  #       This block requires the "Eagle.Library" package.
  #
  if {[isEagle]} then {
    catch {
      #
      # NOTE: Check the name of the current call frame against the one
      #       that should be used for evaluating this script file.
      #
      if {[object invoke -flags +NonPublic \
              Interpreter.GetActive.CurrentFrame Name] ne \
................................................................................

    tputs $test_channel [appendArgs "---- threadId: " \
        [info tid] \n]

    tputs $test_channel [appendArgs "---- processors: " \
        [info processors] \n]


    catch {object invoke Console.InputEncoding WebName} encoding




    tputs $test_channel [appendArgs "---- input encoding: " \
        $encoding \n]


    catch {object invoke Console.OutputEncoding WebName} encoding




    tputs $test_channel [appendArgs "---- output encoding: " \
        $encoding \n]

    unset encoding
    catch {host query} host

................................................................................
  tputs $test_channel [appendArgs "---- starting command count: " \
      [info cmdcount] \n]

  if {[isEagle]} then {
    #
    # NOTE: Show the starting operation count (for Eagle only).
    #

    catch {
      object invoke -flags +NonPublic Interpreter.GetActive OperationCount
    } operationCount




    tputs $test_channel [appendArgs "---- starting operation count: " \
        $operationCount \n]

    unset operationCount

    #







|







 







>
|
>
>
>




>
|
>
>
>







 







>
|
|
|
>
>
>







215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
...
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
....
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077

  #
  # NOTE: Verify that the current call frame is correct and that the
  #       interpreter call stack has not been imbalanced by previous
  #       tests or other errors.  This check only applies to Eagle.
  #       This block requires the "Eagle.Library" package.
  #
  if {[isEagle] && [llength [info commands object]] > 0} then {
    catch {
      #
      # NOTE: Check the name of the current call frame against the one
      #       that should be used for evaluating this script file.
      #
      if {[object invoke -flags +NonPublic \
              Interpreter.GetActive.CurrentFrame Name] ne \
................................................................................

    tputs $test_channel [appendArgs "---- threadId: " \
        [info tid] \n]

    tputs $test_channel [appendArgs "---- processors: " \
        [info processors] \n]

    if {[llength [info commands object]] > 0} then {
      catch {object invoke Console.InputEncoding WebName} encoding
    } else {
      set encoding unavailable
    }

    tputs $test_channel [appendArgs "---- input encoding: " \
        $encoding \n]

    if {[llength [info commands object]] > 0} then {
      catch {object invoke Console.OutputEncoding WebName} encoding
    } else {
      set encoding unavailable
    }

    tputs $test_channel [appendArgs "---- output encoding: " \
        $encoding \n]

    unset encoding
    catch {host query} host

................................................................................
  tputs $test_channel [appendArgs "---- starting command count: " \
      [info cmdcount] \n]

  if {[isEagle]} then {
    #
    # NOTE: Show the starting operation count (for Eagle only).
    #
    if {[llength [info commands object]] > 0} then {
      catch {
        object invoke -flags +NonPublic Interpreter.GetActive OperationCount
      } operationCount
    } else {
      set operationCount unavailable
    }

    tputs $test_channel [appendArgs "---- starting operation count: " \
        $operationCount \n]

    unset operationCount

    #

Changes to Tests/common.eagle.

1245
1246
1247
1248
1249
1250
1251


















1252
1253
1254
1255
1256
1257
1258
....
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
....
2268
2269
2270
2271
2272
2273
2274

2275


2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307


2308
2309

2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323

2324
2325
2326
2327
2328
2329
2330
2331
2332



2333
2334
2335
2336
2337
2338
2339
        if {![info exists ::no(shimSQLiteVisualStudioConstraints)]} then {
          addConstraint [appendArgs visualStudio [getBuildYear]]
        }

        tputs $channel no\n
      }
    }


















 
    proc checkForSQLiteBuilds { channel {select false} } {
      #
      # NOTE: Check for every possible valid combination of values used when
      #       locating out the build output directory, showing each available
      #       build variation along the way.
      #
................................................................................
              #
              if {$select && [matchMachine $platform]} then {
                #
                # NOTE: Manually override all the build directory selection
                #       related test settings in order to force this build
                #       of System.Data.SQLite to be used.
                #
                if {[catch {
                  object invoke Interpreter.GetActive [expr {$native ? \
                      "AddRuntimeOption" : "RemoveRuntimeOption"}] native
                } error]} then {
                  tputs $channel [appendArgs \
                      "no, failed to " [expr {$native ? "add" : "remove"}] \
                      " the \"native\" runtime option, error: " \n\t $error \n]

                  return false
                }

                set ::test_year $year
                set ::test_platform $platform
                set ::test_configuration $configuration
................................................................................
      return $code
    }
 
    proc setupDbInterruptCallback { channel log } {
      tputs $channel "---- setting up debugger interrupt callback... "

      if {[catch {

        #


        # NOTE: Make sure the script debugger and the isolated interpreter are
        #       setup and ready for use.
        #
        debug setup true true

        #
        # NOTE: Load the necessary packages into the isolated interpreter.
        #
        debug eval {
          package require Eagle
          package require Eagle.Library
          package require Eagle.Test
        }

        #
        # NOTE: Copy the necessary variables into the isolated interpreter.
        #
        debug invoke 0 set ::test_channel $channel; # NOTE: For [tputs].
        debug invoke 0 set ::test_log $log; # NOTE: For [tlog].

        #
        # NOTE: Install the callback script to be evaluated in the isolated
        #       interpreter when this interpreter is interrupted by script
        #       cancellation, etc.
        #
        debug callback apply {{sender e} {
          #
          # NOTE: Check if this callback is one that we care about.
          #
          if {"Canceled" in [split [$e InterruptType] ", "]} then {
            #
            # NOTE: Make sure the [object] command is available.


            #
            if {[haveSQLiteObjectCommand]} then {

              #
              # NOTE: Iterate through all database connections known to the
              #       parent interpreter.
              #
              object foreach -alias pair [object invoke -flags +NonPublic \
                  $e Interpreter.connections] {
                #
                # NOTE: Attempt to cancel any SQL queries in progress on this
                #       database connection.
                #
                if {[catch {$pair Value.Cancel} error]} then {
                  tputs $::test_channel [appendArgs \n \
                      "==== WARNING: failed to cancel query for connection \"" \
                      [$pair Key] "\", error: " \n\t $error \n]

                }
              }
            } else {
              tputs $::test_channel [appendArgs \n \
                  "==== WARNING: cannot cancel any queries: " \
                  "the \"object\" command is not available\n"]
            }
          }
        }}



      } error] == 0} then {
        addConstraint interruptCallback.sqlite3

        tputs $channel yes\n
      } else {
        tputs $channel [appendArgs "no, error: " \n\t $error \n]
      }







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







 







|
<
<
<


|







 







>
|
>
>
|
|
|
|

|
|
|
|
|
|
|
|

|
|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
>
>
|
<
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
>
>
>







1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
....
1310
1311
1312
1313
1314
1315
1316
1317



1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
....
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328

2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
        if {![info exists ::no(shimSQLiteVisualStudioConstraints)]} then {
          addConstraint [appendArgs visualStudio [getBuildYear]]
        }

        tputs $channel no\n
      }
    }
 
    proc changeNativeRuntimeOption { native } {
      if {[llength [info commands debug]] > 0 && \
          [llength [info subcommands debug runtimeoption]] > 0 && [catch {
        debug runtimeoption [expr {$native ? "add" : "remove"}] native
      }] == 0} then {
        return true
      }

      if {[haveSQLiteObjectCommand] && [catch {
        object invoke Interpreter.GetActive [expr {$native ? \
            "AddRuntimeOption" : "RemoveRuntimeOption"}] native
      }] == 0} then {
        return true
      }

      return false
    }
 
    proc checkForSQLiteBuilds { channel {select false} } {
      #
      # NOTE: Check for every possible valid combination of values used when
      #       locating out the build output directory, showing each available
      #       build variation along the way.
      #
................................................................................
              #
              if {$select && [matchMachine $platform]} then {
                #
                # NOTE: Manually override all the build directory selection
                #       related test settings in order to force this build
                #       of System.Data.SQLite to be used.
                #
                if {![changeNativeRuntimeOption $native]} then {



                  tputs $channel [appendArgs \
                      "no, failed to " [expr {$native ? "add" : "remove"}] \
                      " the \"native\" runtime option\n"]

                  return false
                }

                set ::test_year $year
                set ::test_platform $platform
                set ::test_configuration $configuration
................................................................................
      return $code
    }
 
    proc setupDbInterruptCallback { channel log } {
      tputs $channel "---- setting up debugger interrupt callback... "

      if {[catch {
        set ::env(quietSetupInterpreterTestPath) 1

        try {
          #
          # NOTE: Make sure the script debugger and the isolated interpreter
          #       are setup and ready for use.
          #
          debug setup true true

          #
          # NOTE: Load the necessary packages into the isolated interpreter.
          #
          debug eval {
            package require Eagle
            package require Eagle.Library
            package require Eagle.Test
          }

          #
          # NOTE: Copy the necessary variables into the isolated interpreter.
          #
          debug invoke 0 set ::test_channel $channel; # NOTE: For [tputs].
          debug invoke 0 set ::test_log $log; # NOTE: For [tlog].

          #
          # NOTE: Install the callback script to be evaluated in the isolated
          #       interpreter when this interpreter is interrupted by script
          #       cancellation, etc.
          #
          debug callback apply {{sender e} {
            #
            # NOTE: Check if this callback is one that we care about.
            #
            if {"Canceled" in [split [$e InterruptType] ", "]} then {
              #
              # NOTE: Make sure the [object] command is available.  Since
              #       this is an isolated interpreter, check for it the hard
              #       way.
              #

              if {[llength [info commands object]] > 0} then {
                #
                # NOTE: Iterate through all database connections known to the
                #       parent interpreter.
                #
                object foreach -alias pair [object invoke -flags +NonPublic \
                    $e Interpreter.connections] {
                  #
                  # NOTE: Attempt to cancel any SQL queries in progress on
                  #       this database connection.
                  #
                  if {[catch {$pair Value.Cancel} error]} then {
                    tputs $::test_channel [appendArgs \n \
                        "==== WARNING: failed to cancel query for " \
                        "connection \"" [$pair Key] "\", error: " \n\t \
                        $error \n]
                  }
                }
              } else {
                tputs $::test_channel [appendArgs \n \
                    "==== WARNING: cannot cancel any queries: " \
                    "the \"object\" command is not available\n"]
              }
            }
          }}
        } finally {
          catch {unset ::env(quietSetupInterpreterTestPath)}
        }
      } error] == 0} then {
        addConstraint interruptCallback.sqlite3

        tputs $channel yes\n
      } else {
        tputs $channel [appendArgs "no, error: " \n\t $error \n]
      }

Changes to Tests/settings.before.mistachkin.eagle.

4
5
6
7
8
9
10

11
12
13
14

#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

if {[info exists ::env(TEST_ALL)]} then {

  catch {
    object invoke Interpreter.GetActive AddRuntimeOption noPoolCounts
  }
}








>
|
|
|
|
>
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# Written by Joe Mistachkin.
# Released to the public domain, use at your own risk!
#
###############################################################################

if {[info exists ::env(TEST_ALL)]} then {
  if {[haveSQLiteObjectCommand]} then {
    catch {
      object invoke Interpreter.GetActive AddRuntimeOption noPoolCounts
    }
  }
}