System.Data.SQLite
Check-in [211a88540a]
Not logged in

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

Overview
Comment:Skip copying native files to the test binary directory when not running on the default platform.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 211a88540a979b4890fcc4a365b9d01ffdf37638
User & Date: mistachkin 2014-01-24 07:07:34
Context
2014-01-24
17:03
Minor corrections to the test automation. check-in: acd91e80a9 user: mistachkin tags: trunk
07:07
Skip copying native files to the test binary directory when not running on the default platform. check-in: 211a88540a user: mistachkin tags: trunk
01:27
More work on getting 32-bit on 64-bit testing support working. check-in: b310edde93 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Tests/common.eagle.

144
145
146
147
148
149
150


























151
152
153
154
155
156
157
...
814
815
816
817
818
819
820

821
822
823
824

825
826
827
828
829
830
831
832
833
834
835
...
849
850
851
852
853
854
855

856
857
858
859

860
861
862
863
864
865
866
867
868
869
870
...
884
885
886
887
888
889
890

891
892
893
894

895
896
897
898
899
900
901
902
903
904
905
...
919
920
921
922
923
924
925
926
927
928
929

930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949

950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965

966
967
968
969
970
971
972
973
974

975
976
977
978
979
980
981
982
983
984
985
986
987
....
2647
2648
2649
2650
2651
2652
2653





2654

2655
2656
2657
2658
2659
2660
2661
          }
          default {
            return netFx35; # TODO: Good "fallback" default?
          }
        }
      }
    }


























 
    proc getBuildPlatform { native } {
      if {[info exists ::test_platform] && \
          [string length $::test_platform] > 0} then {
        #
        # NOTE: Use the specified test platform.  If this variable is not set,
        #       the default value will be based on the machine architecture.
................................................................................
      return [uplevel 1 [list subst [appendArgs $prefix {
        if {[hasRuntimeOption native]} then {
          object invoke Interpreter.GetActive AddRuntimeOption native
        }
      } [getTestOverridesPreamble [list path test_channel]] $suffix]]]
    }
 

    proc tryCopyExternalFile { fileName {platform ""} {newFileName ""} } {
      set sourceFileName [getExternalFileName $fileName]

      if {![file exists $sourceFileName]} then {

        tputs $::test_channel [appendArgs \
            "---- skipped copying external file \"" $sourceFileName \
            "\", it does not exist\n"]

        return
      }

      if {[string length $newFileName] > 0} then {
        set targetFileName [getBinaryFileName $newFileName $platform]
      } else {
        set targetFileName [getBinaryFileName $fileName $platform]
................................................................................
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to copy external file from \"" $sourceFileName \
            "\" to \"" $targetFileName \"\n]
      }
    }
 

    proc tryCopyBinaryFile { fileName {platform ""} {newFileName ""} } {
      set sourceFileName [getBinaryFileName $fileName $platform]

      if {![file exists $sourceFileName]} then {

        tputs $::test_channel [appendArgs \
            "---- skipped copying binary file \"" $sourceFileName \
            "\", it does not exist\n"]

        return
      }

      if {[string length $newFileName] > 0} then {
        set targetFileName [getBuildFileName $newFileName $platform]
      } else {
        set targetFileName [getBuildFileName $fileName $platform]
................................................................................
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to copy binary file from \"" $sourceFileName \
            "\" to \"" $targetFileName \"\n]
      }
    }
 

    proc tryCopyBuildFile { fileName {platform ""} {newFileName ""} } {
      set sourceFileName [getBuildFileName $fileName $platform]

      if {![file exists $sourceFileName]} then {

        tputs $::test_channel [appendArgs \
            "---- skipped copying build file \"" $sourceFileName \
            "\", it does not exist\n"]

        return
      }

      if {[string length $newFileName] > 0} then {
        set targetFileName [getBinaryFileName $newFileName $platform]
      } else {
        set targetFileName [getBinaryFileName $fileName $platform]
................................................................................
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to copy build file from \"" $sourceFileName \
            "\" to \"" $targetFileName \"\n]
      }
    }
 
    proc tryDeleteBinaryFile { fileName {platform ""} } {
      set fileName [getBinaryFileName $fileName $platform]

      if {![file exists $fileName]} then {

        tputs $::test_channel [appendArgs \
            "---- skipped deleting binary file \"" $fileName \
            "\", it does not exist\n"]

        return
      }

      if {[catch {file delete $fileName}] == 0} then {
        tputs $::test_channel [appendArgs \
            "---- deleted binary file \"" $fileName \"\n]
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to delete binary file \"" $fileName \"\n]
      }
    }
 
    proc tryDeleteBuildFile { fileName {platform ""} } {
      set fileName [getBuildFileName $fileName $platform]

      if {![file exists $fileName]} then {

        tputs $::test_channel [appendArgs \
            "---- skipped deleting build file \"" $fileName \
            "\", it does not exist\n"]

        return
      }

      if {[catch {file delete $fileName}] == 0} then {
        tputs $::test_channel [appendArgs \
            "---- deleted build file \"" $fileName \"\n]
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to delete build file \"" $fileName \"\n]
      }
    }
 

    proc tryCopyAssembly { fileName {platform ""} {pdb true} } {
      tryCopyBuildFile $fileName $platform

      if {$pdb} then {
        tryCopyBuildFile [appendArgs \
            [file rootname $fileName] .pdb] $platform
      }
    }
 

    proc tryDeleteAssembly { fileName {platform ""} {pdb true} } {
      tryDeleteBinaryFile $fileName $platform

      if {$pdb} then {
        tryDeleteBinaryFile [appendArgs \
            [file rootname $fileName] .pdb] $platform
      }
    }
 
    proc tryLoadAssembly { fileName {platform ""} } {
      set fileName [getBinaryFileName $fileName $platform]

      if {[catch {
................................................................................
              #
              foreach fileName $externalFileNames {
                tryCopyExternalFile $fileName
              }
            }

            if {![info exists ::no(copySqliteNativeFiles)]} then {





              if {![info exists ::no(copySqliteImplicitFiles)]} then {

                foreach fileName $nativeFileNames {
                  tryCopyAssembly $fileName
                }
              }

              if {![info exists ::no(copySqliteNonImplicitFiles)]} then {
                if {![info exists ::no(copySqlitePlatformFiles)] && \







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







 







>
|



>
|
|
|
|







 







>
|



>
|
|
|
|







 







>
|



>
|
|
|
|







 







|



>
|
|
|
|












|



>
|
|
|
|












>
|
|



|



>
|
|



|







 







>
>
>
>
>
|
>







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
...
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
...
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
...
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
...
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
....
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
          }
          default {
            return netFx35; # TODO: Good "fallback" default?
          }
        }
      }
    }
 
    #
    # NOTE: This procedure should return non-zero if the configured test
    #       platform is most likely the default for this machine.
    #
    proc isDefaultBuildPlatform { {verbose false} } {
      #
      # NOTE: Running on WoW64 is never the default platform.
      #
      if {[info exists ::eagle_platform(wow64)] && \
          $::eagle_platform(wow64)} then {
        if {$verbose} then {
          tputs $::test_channel \
              "---- detected non-default platform (WoW64)\n"
        }
        return false
      }

      #
      # NOTE: This has a good chance of being the default platform.
      #
      if {$verbose} then {
        tputs $::test_channel "---- detected default platform\n"
      }
      return true
    }
 
    proc getBuildPlatform { native } {
      if {[info exists ::test_platform] && \
          [string length $::test_platform] > 0} then {
        #
        # NOTE: Use the specified test platform.  If this variable is not set,
        #       the default value will be based on the machine architecture.
................................................................................
      return [uplevel 1 [list subst [appendArgs $prefix {
        if {[hasRuntimeOption native]} then {
          object invoke Interpreter.GetActive AddRuntimeOption native
        }
      } [getTestOverridesPreamble [list path test_channel]] $suffix]]]
    }
 
    proc tryCopyExternalFile {
            fileName {platform ""} {newFileName ""} {verbose false} } {
      set sourceFileName [getExternalFileName $fileName]

      if {![file exists $sourceFileName]} then {
        if {$verbose} then {
          tputs $::test_channel [appendArgs \
              "---- skipped copying external file \"" $sourceFileName \
              "\", it does not exist\n"]
        }
        return
      }

      if {[string length $newFileName] > 0} then {
        set targetFileName [getBinaryFileName $newFileName $platform]
      } else {
        set targetFileName [getBinaryFileName $fileName $platform]
................................................................................
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to copy external file from \"" $sourceFileName \
            "\" to \"" $targetFileName \"\n]
      }
    }
 
    proc tryCopyBinaryFile {
            fileName {platform ""} {newFileName ""} {verbose false} } {
      set sourceFileName [getBinaryFileName $fileName $platform]

      if {![file exists $sourceFileName]} then {
        if {$verbose} then {
          tputs $::test_channel [appendArgs \
              "---- skipped copying binary file \"" $sourceFileName \
              "\", it does not exist\n"]
        }
        return
      }

      if {[string length $newFileName] > 0} then {
        set targetFileName [getBuildFileName $newFileName $platform]
      } else {
        set targetFileName [getBuildFileName $fileName $platform]
................................................................................
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to copy binary file from \"" $sourceFileName \
            "\" to \"" $targetFileName \"\n]
      }
    }
 
    proc tryCopyBuildFile {
            fileName {platform ""} {newFileName ""} {verbose false} } {
      set sourceFileName [getBuildFileName $fileName $platform]

      if {![file exists $sourceFileName]} then {
        if {$verbose} then {
          tputs $::test_channel [appendArgs \
              "---- skipped copying build file \"" $sourceFileName \
              "\", it does not exist\n"]
        }
        return
      }

      if {[string length $newFileName] > 0} then {
        set targetFileName [getBinaryFileName $newFileName $platform]
      } else {
        set targetFileName [getBinaryFileName $fileName $platform]
................................................................................
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to copy build file from \"" $sourceFileName \
            "\" to \"" $targetFileName \"\n]
      }
    }
 
    proc tryDeleteBinaryFile { fileName {platform ""} {verbose false} } {
      set fileName [getBinaryFileName $fileName $platform]

      if {![file exists $fileName]} then {
        if {$verbose} then {
          tputs $::test_channel [appendArgs \
              "---- skipped deleting binary file \"" $fileName \
              "\", it does not exist\n"]
        }
        return
      }

      if {[catch {file delete $fileName}] == 0} then {
        tputs $::test_channel [appendArgs \
            "---- deleted binary file \"" $fileName \"\n]
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to delete binary file \"" $fileName \"\n]
      }
    }
 
    proc tryDeleteBuildFile { fileName {platform ""} {verbose false} } {
      set fileName [getBuildFileName $fileName $platform]

      if {![file exists $fileName]} then {
        if {$verbose} then {
          tputs $::test_channel [appendArgs \
              "---- skipped deleting build file \"" $fileName \
              "\", it does not exist\n"]
        }
        return
      }

      if {[catch {file delete $fileName}] == 0} then {
        tputs $::test_channel [appendArgs \
            "---- deleted build file \"" $fileName \"\n]
      } else {
        tputs $::test_channel [appendArgs \
            "---- failed to delete build file \"" $fileName \"\n]
      }
    }
 
    proc tryCopyAssembly {
            fileName {platform ""} {pdb true} {verbose false} } {
      tryCopyBuildFile $fileName $platform "" $verbose

      if {$pdb} then {
        tryCopyBuildFile [appendArgs \
            [file rootname $fileName] .pdb] $platform "" $verbose
      }
    }
 
    proc tryDeleteAssembly {
            fileName {platform ""} {pdb true} {verbose false} } {
      tryDeleteBinaryFile $fileName $platform $verbose

      if {$pdb} then {
        tryDeleteBinaryFile [appendArgs \
            [file rootname $fileName] .pdb] $platform $verbose
      }
    }
 
    proc tryLoadAssembly { fileName {platform ""} } {
      set fileName [getBinaryFileName $fileName $platform]

      if {[catch {
................................................................................
              #
              foreach fileName $externalFileNames {
                tryCopyExternalFile $fileName
              }
            }

            if {![info exists ::no(copySqliteNativeFiles)]} then {
              #
              # NOTE: If the test platform is likely the default for this
              #       machine, also try to copy the native files to the
              #       binary location.
              #
              if {![info exists ::no(copySqliteImplicitFiles)] && \
                  [isDefaultBuildPlatform true]} then {
                foreach fileName $nativeFileNames {
                  tryCopyAssembly $fileName
                }
              }

              if {![info exists ::no(copySqliteNonImplicitFiles)]} then {
                if {![info exists ::no(copySqlitePlatformFiles)] && \