System.Data.SQLite

Check-in [337076bac1]
Login

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

Overview
Comment:Improve cross-platform detection and use of the SQLite interop assembly / SQLite native library by the test suite infrastructure.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 337076bac11643f8eb7461ab26cfd15bd997d385
User & Date: mistachkin 2018-07-23 05:52:06.912
Context
2018-07-23
06:19
Enhancements to POSIX build scripts. check-in: 95766a2582 user: mistachkin tags: trunk
05:52
Improve cross-platform detection and use of the SQLite interop assembly / SQLite native library by the test suite infrastructure. check-in: 337076bac1 user: mistachkin tags: trunk
05:39
Fix typo in the vendor configuration file for the test suite. check-in: 8b8890b4fe user: mistachkin tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Setup/run-mono-tests-debug.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

if [[ -z "$SQLITE_NET_YEAR" ]]; then
  SQLITE_NET_YEAR=2013
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/netFramework40/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Debug; set test_year $SQLITE_NET_YEAR; set build_directory {bin/$SQLITE_NET_YEAR/Debug$SQLITE_NET_CONFIGURATION_SUFFIX/bin}; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle "$@"
popd




<
<
<
<
<
<





|

1
2
3
4






5
6
7
8
9
10
11
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`







if [[ -z "$SQLITE_NET_YEAR" ]]; then
  SQLITE_NET_YEAR=2013
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/netFramework40/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Debug; set test_year $SQLITE_NET_YEAR; set build_directory {bin/$SQLITE_NET_YEAR/Debug$SQLITE_NET_CONFIGURATION_SUFFIX/bin}" -file Tests/all.eagle "$@"
popd
Changes to Setup/run-mono-tests-release.sh.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`

if [[ "$OSTYPE" == "darwin"* ]]; then
  libname=libSQLite.Interop.dylib
else
  libname=libSQLite.Interop.so
fi

if [[ -z "$SQLITE_NET_YEAR" ]]; then
  SQLITE_NET_YEAR=2013
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/netFramework40/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Release; set test_year $SQLITE_NET_YEAR; set build_directory {bin/$SQLITE_NET_YEAR/Release$SQLITE_NET_CONFIGURATION_SUFFIX/bin}; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle "$@"
popd




<
<
<
<
<
<





|

1
2
3
4






5
6
7
8
9
10
11
#!/bin/bash

scriptdir=`dirname "$BASH_SOURCE"`







if [[ -z "$SQLITE_NET_YEAR" ]]; then
  SQLITE_NET_YEAR=2013
fi

pushd "$scriptdir/.."
mono Externals/Eagle/bin/netFramework40/EagleShell.exe -preInitialize "set root_path {$scriptdir/..}; set test_configuration Release; set test_year $SQLITE_NET_YEAR; set build_directory {bin/$SQLITE_NET_YEAR/Release$SQLITE_NET_CONFIGURATION_SUFFIX/bin}" -file Tests/all.eagle "$@"
popd
Changes to Setup/run-netstandard20-tests-debug.sh.
15
16
17
18
19
20
21

22
23
24
25
26
27
28
pushd "$scriptdir/.."

SQLITE_INTEROP_DIR=bin/$SQLITE_NET_YEAR/Debug$SQLITE_NET_CONFIGURATION_SUFFIX/bin
SQLITE_INTEROP_FILE=$SQLITE_INTEROP_DIR/$libname

if [[ -f "${SQLITE_INTEROP_FILE}" ]]; then
  cp "$SQLITE_INTEROP_FILE" "$SQLITE_INTEROP_DIR/SQLite.Interop.dll"

fi

libname=SQLite.Interop.dll

dotnet exec Externals/Eagle/bin/netStandard20/EagleShell.dll -preInitialize "set test_configuration Debug; set test_year NetStandard20; set test_native_year $SQLITE_NET_YEAR; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle "$@"

popd







>


<
<
|


15
16
17
18
19
20
21
22
23
24


25
26
27
pushd "$scriptdir/.."

SQLITE_INTEROP_DIR=bin/$SQLITE_NET_YEAR/Debug$SQLITE_NET_CONFIGURATION_SUFFIX/bin
SQLITE_INTEROP_FILE=$SQLITE_INTEROP_DIR/$libname

if [[ -f "${SQLITE_INTEROP_FILE}" ]]; then
  cp "$SQLITE_INTEROP_FILE" "$SQLITE_INTEROP_DIR/SQLite.Interop.dll"
  libname=SQLite.Interop.dll
fi



dotnet exec Externals/Eagle/bin/netStandard20/EagleShell.dll -preInitialize "set test_configuration Debug; set test_year NetStandard20; set test_native_year $SQLITE_NET_YEAR" -file Tests/all.eagle "$@"

popd
Changes to Setup/run-netstandard20-tests-release.sh.
15
16
17
18
19
20
21

22
23
24
25
26
27
28
pushd "$scriptdir/.."

SQLITE_INTEROP_DIR=bin/$SQLITE_NET_YEAR/Release$SQLITE_NET_CONFIGURATION_SUFFIX/bin
SQLITE_INTEROP_FILE=$SQLITE_INTEROP_DIR/$libname

if [[ -f "${SQLITE_INTEROP_FILE}" ]]; then
  cp "$SQLITE_INTEROP_FILE" "$SQLITE_INTEROP_DIR/SQLite.Interop.dll"

fi

libname=SQLite.Interop.dll

dotnet exec Externals/Eagle/bin/netStandard20/EagleShell.dll -preInitialize "set test_configuration Release; set test_year NetStandard20; set test_native_year $SQLITE_NET_YEAR; set interop_assembly_file_names $libname" -initialize -postInitialize "unset no(deleteSqliteImplicitNativeFiles); unset no(copySqliteImplicitNativeFiles)" -file Tests/all.eagle "$@"

popd







>


<
<
|


15
16
17
18
19
20
21
22
23
24


25
26
27
pushd "$scriptdir/.."

SQLITE_INTEROP_DIR=bin/$SQLITE_NET_YEAR/Release$SQLITE_NET_CONFIGURATION_SUFFIX/bin
SQLITE_INTEROP_FILE=$SQLITE_INTEROP_DIR/$libname

if [[ -f "${SQLITE_INTEROP_FILE}" ]]; then
  cp "$SQLITE_INTEROP_FILE" "$SQLITE_INTEROP_DIR/SQLite.Interop.dll"
  libname=SQLite.Interop.dll
fi



dotnet exec Externals/Eagle/bin/netStandard20/EagleShell.dll -preInitialize "set test_configuration Release; set test_year NetStandard20; set test_native_year $SQLITE_NET_YEAR" -file Tests/all.eagle "$@"

popd
Changes to lib/System.Data.SQLite/common.eagle.
597
598
599
600
601
602
603






604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622














623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650














651
652
653
654
655
656
657
658
659
660
661
662
663
664

      #
      # NOTE: If the test suite cannot use [exec] or execution of CorFlags
      #       failed, return false.
      #
      return false
    }







    proc getNativeLibraryFileNamesOnly {} {
      #
      # NOTE: First, check if the list of native library file names has been
      #       manually overridden.
      #
      if {[info exists ::native_library_file_names] && \
          [llength $::native_library_file_names] > 0} then {
        #
        # NOTE: The list of native library file names has been overridden;
        #       therefore, use it verbatim.
        #
        return $::native_library_file_names
      } elseif {[isWindows]} then {
        #
        # NOTE: Otherwise, on Windows, always use the default file name
        #       "sqlite3.dll".
        #
        return [list sqlite3.dll]














      } else {
        #
        # NOTE: Otherwise, return both the generic POSIX file name and the
        #       Mac OS X file name, since we do not currently have an easy
        #       way to detect which of those platforms we are running on.
        #
        return [list libsqlite3.dylib libsqlite3.so]
      }
    }

    proc getInteropAssemblyFileNamesOnly {} {
      #
      # NOTE: First, check if the list of interop assembly file names has been
      #       manually overridden.
      #
      if {[info exists ::interop_assembly_file_names] && \
          [llength $::interop_assembly_file_names] > 0} then {
        #
        # NOTE: The list of interop assembly file names has been overridden;
        #       therefore, use it verbatim.
        #
        return $::interop_assembly_file_names
      } elseif {[isWindows]} then {
        #
        # NOTE: Otherwise, on Windows, always use the default file name
        #       "SQLite.Interop.dll".
        #
        return [list SQLite.Interop.dll]














      } else {
        #
        # NOTE: Otherwise, return both the generic POSIX file name and the
        #       Mac OS X file name, since we do not currently have an easy
        #       way to detect which of those platforms we are running on.
        #
        return [list libSQLite.Interop.dylib libSQLite.Interop.so]
      }
    }

    proc getCoreExtensionBinaryFileName { {default ""} } {
      set fileName [getCoreBinaryFileName]

      if {[file exists $fileName]} then {







>
>
>
>
>
>















|
|


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


|
|
<

|

















|
|


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


|
|
<

|







597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646

647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687

688
689
690
691
692
693
694
695
696

      #
      # NOTE: If the test suite cannot use [exec] or execution of CorFlags
      #       failed, return false.
      #
      return false
    }

    proc isDarwin {} {
      return [expr {
        [info exists ::tcl_platform(os)] && $::tcl_platform(os) eq "Darwin"
      }]
    }

    proc getNativeLibraryFileNamesOnly {} {
      #
      # NOTE: First, check if the list of native library file names has been
      #       manually overridden.
      #
      if {[info exists ::native_library_file_names] && \
          [llength $::native_library_file_names] > 0} then {
        #
        # NOTE: The list of native library file names has been overridden;
        #       therefore, use it verbatim.
        #
        return $::native_library_file_names
      } elseif {[isWindows]} then {
        #
        # NOTE: Otherwise, on Win32 always use the standard native library
        #       file name "sqlite3.dll".
        #
        return [list sqlite3.dll]
      } elseif {[isDotNetCore]} then {
        #
        #       When running on .NET Core, return the same native library
        #       file name that is used on Windows (i.e. otherwise, assume
        #       we are running on Mono and use its P/Invoke conventions).
        #
        return [list sqlite3.dll]
      } elseif {[isDarwin]} then {
        #
        # NOTE: When running on Darwin (i.e. the kernel of iOS / Mac OS X),
        #       return the Mac OS X native library file name.  This file
        #       name is normally required for Mono.
        #
        return [list libsqlite3.dylib]
      } else {
        #
        # NOTE: Otherwise, return the generic POSIX native library file
        #       name.  This file name is normally required for Mono.

        #
        return [list libsqlite3.so]
      }
    }

    proc getInteropAssemblyFileNamesOnly {} {
      #
      # NOTE: First, check if the list of interop assembly file names has been
      #       manually overridden.
      #
      if {[info exists ::interop_assembly_file_names] && \
          [llength $::interop_assembly_file_names] > 0} then {
        #
        # NOTE: The list of interop assembly file names has been overridden;
        #       therefore, use it verbatim.
        #
        return $::interop_assembly_file_names
      } elseif {[isWindows]} then {
        #
        # NOTE: Otherwise, on Win32, always use the interop assembly file
        #       name "SQLite.Interop.dll".
        #
        return [list SQLite.Interop.dll]
      } elseif {[isDotNetCore]} then {
        #
        #       When running on .NET Core, return the same interp assembly
        #       file name that is used on Windows (i.e. otherwise, assume
        #       we are running on Mono and use its P/Invoke conventions).
        #
        return [list SQLite.Interop.dll]
      } elseif {[isDarwin]} then {
        #
        # NOTE: When running on Darwin (i.e. the kernel of iOS / Mac OS X),
        #       return the Mac OS X interp assembly file name.  This file
        #       name is normally required for Mono.
        #
        return [list libSQLite.Interop.dylib]
      } else {
        #
        # NOTE: Otherwise, return the generic POSIX interp assembly file
        #       name.  This file name is normally required for Mono.

        #
        return [list libSQLite.Interop.so]
      }
    }

    proc getCoreExtensionBinaryFileName { {default ""} } {
      set fileName [getCoreBinaryFileName]

      if {[file exists $fileName]} then {