System.Data.SQLite
Check-in [14ea2fc53d]
Not logged in

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

Overview
Comment:Permit the automatic selection of the first available build of System.Data.SQLite when running the test suite (via the '-runtimeOption autoSelect' command line option).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 14ea2fc53db50956b8fa0cb080b30526ae21378d
User & Date: mistachkin 2013-10-29 21:16:58
Context
2013-10-29
21:34
Code style fix. check-in: fc1d93be1c user: mistachkin tags: trunk
21:16
Permit the automatic selection of the first available build of System.Data.SQLite when running the test suite (via the '-runtimeOption autoSelect' command line option). check-in: 14ea2fc53d user: mistachkin tags: trunk
18:26
Add command line wrapper tool to make it easy to launch the unit testing infrastructure environment (i.e. a customized Eagle Shell). check-in: 9de6bd5d0c user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Setup/test.bat.

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
IF ERRORLEVEL 1 (
  ECHO Could not change directory to "%ROOT%".
  GOTO errors
)

IF NOT DEFINED PREARGS (
  %_AECHO% No pre-arguments specified, using default...
  SET PREARGS=-interactive -noExit
)

%_VECHO% PreArgs = '%PREARGS%'

IF NOT DEFINED POSTARGS (
  %_AECHO% No post-arguments specified, using default...
  SET POSTARGS=-file Tests\empty.eagle







|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
IF ERRORLEVEL 1 (
  ECHO Could not change directory to "%ROOT%".
  GOTO errors
)

IF NOT DEFINED PREARGS (
  %_AECHO% No pre-arguments specified, using default...
  SET PREARGS=-interactive -noExit -initialize -runtimeOption autoSelect
)

%_VECHO% PreArgs = '%PREARGS%'

IF NOT DEFINED POSTARGS (
  %_AECHO% No post-arguments specified, using default...
  SET POSTARGS=-file Tests\empty.eagle

Changes to Tests/common.eagle.

711
712
713
714
715
716
717























718
719
720
721
722
723
724
725
726








727
728


729
730







731
732
733
734




735

























736

737
738
739
740
741
742
743
....
1880
1881
1882
1883
1884
1885
1886









1887
1888
1889
1890
1891
1892
1893
      #       the SQLite native library; otherwise, this procedure will simply
      #       always return zero.
      #
      return [expr {[haveConstraint System.Data.SQLite] && \
          [haveConstraint SQLite]}]
    }
 























    proc checkForSQLiteBuilds { channel } {
      #
      # 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.
      #
      foreach native [list false true] {
        foreach year [getBuildYears] {
          foreach configuration [getBuildConfigurations] {








            tputs $channel [appendArgs \
                "---- checking for System.Data.SQLite build \"" [expr \


                {$native ? "native/" : ""}] $year / $configuration "\"... "]








            set fileName [file nativename [file join [joinBuildDirectory \
                $native [getBuildBaseDirectory] $year [getBuildPlatform \
                $native] $configuration] System.Data.SQLite.dll]]





            if {[file exists $fileName]} then {

























              tputs $channel yes\n

            } else {
              tputs $channel no\n
            }
          }
        }
      }
    }
................................................................................

            tryDeleteAssembly System.Data.SQLite.dll
            removeConstraint file_System.Data.SQLite.dll

            tryDeleteAssembly System.Data.SQLite.Linq.dll
            removeConstraint file_System.Data.SQLite.Linq.dll
          }










          #
          # NOTE: Skip trying to verify the build directory if we are so
          #       instructed; otherwise, make sure it actually exists or
          #       halt the entire testing process if it does not exist.
          #
          if {![info exists ::no(verifyBuildDirectory)]} then {







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








>
>
>
>
>
>
>
>


>
>
|

>
>
>
>
>
>
>
|
|
|

>
>
>
>

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







 







>
>
>
>
>
>
>
>
>







711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
....
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
      #       the SQLite native library; otherwise, this procedure will simply
      #       always return zero.
      #
      return [expr {[haveConstraint System.Data.SQLite] && \
          [haveConstraint SQLite]}]
    }
 
    proc matchMachine { platform } {
      #
      # NOTE: An empty string for the platform means that the build is not
      #       [primarily] a native build; therefore, it always matches.
      #
      if {[string length $platform] == 0} then {
        return true
      }

      #
      # NOTE: Does the specified platform match up to the current process?
      #
      if {$platform eq [machineToPlatform $::tcl_platform(machine)]} then {
        return true
      }

      #
      # NOTE: The specified platform does not match up with the platform
      #       for the current process.
      #
      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.
      #
      foreach native [list false true] {
        foreach year [getBuildYears] {
          foreach configuration [getBuildConfigurations] {
            #
            # NOTE: Figure out the effective build platform.  This is
            #       based on whether or not a [primarily] native build
            #       is being used.  For [primarily] non-native builds,
            #       this will be an empty string.
            #
            set platform [getBuildPlatform $native]

            tputs $channel [appendArgs \
                "---- checking for System.Data.SQLite build \"" [expr \
                {$native ? "native/" : ""}] [expr {[string length \
                $platform] > 0 ? [appendArgs $platform /] : ""}] $year \
                / $configuration "\"... "]

            #
            # NOTE: Build the fully qualified file name for the primary
            #       assembly containing the System.Data.SQLite managed
            #       components.  It should be noted that this assembly
            #       file may also contain the native components, if a
            #       native build is in use.
            #
            set fileName [file nativename [file join \
                [joinBuildDirectory $native [getBuildBaseDirectory] $year \
                $platform $configuration] System.Data.SQLite.dll]]

            #
            # NOTE: Does the file exist?  Currently, no other steps are
            #       taken to verify this build is actually viable.
            #
            if {[file exists $fileName]} then {
              #
              # NOTE: When in "select" mode, automatically select the first
              #       available build of System.Data.SQLite and then return
              #       immediately.
              #
              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.
                #
                object invoke Interpreter.GetActive [expr {$native ? \
                    "AddRuntimeOption" : "RemoveRuntimeOption"}]  native

                set ::test_year $year
                set ::test_platform $platform
                set ::test_configuration $configuration

                tputs $channel [appendArgs \
                    "yes, selected (" [expr {$native ? "native/" : ""}] \
                    [expr {[string length $platform] > 0 ? [appendArgs \
                    $platform /] : ""}] $year / $configuration ")\n"]

                return
              } else {
                tputs $channel yes\n
              }
            } else {
              tputs $channel no\n
            }
          }
        }
      }
    }
................................................................................

            tryDeleteAssembly System.Data.SQLite.dll
            removeConstraint file_System.Data.SQLite.dll

            tryDeleteAssembly System.Data.SQLite.Linq.dll
            removeConstraint file_System.Data.SQLite.Linq.dll
          }

          #
          # NOTE: Check for the "autoSelect" runtime option.  If present,
          #       attempt to automatically select the first available
          #       build of System.Data.SQLite for use with the test suite.
          #
          if {[hasRuntimeOption autoSelect]} then {
            checkForSQLiteBuilds $::test_channel true
          }

          #
          # NOTE: Skip trying to verify the build directory if we are so
          #       instructed; otherwise, make sure it actually exists or
          #       halt the entire testing process if it does not exist.
          #
          if {![info exists ::no(verifyBuildDirectory)]} then {