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 | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
337076bac11643f8eb7461ab26cfd15b |
User & Date: | mistachkin 2018-07-23 05:52:06 |
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
Changes to Setup/run-mono-tests-debug.sh.
1 1 #!/bin/bash 2 2 3 3 scriptdir=`dirname "$BASH_SOURCE"` 4 4 5 -if [[ "$OSTYPE" == "darwin"* ]]; then 6 - libname=libSQLite.Interop.dylib 7 -else 8 - libname=libSQLite.Interop.so 9 -fi 10 - 11 5 if [[ -z "$SQLITE_NET_YEAR" ]]; then 12 6 SQLITE_NET_YEAR=2013 13 7 fi 14 8 15 9 pushd "$scriptdir/.." 16 -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 "$@" 10 +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 "$@" 17 11 popd
Changes to Setup/run-mono-tests-release.sh.
1 1 #!/bin/bash 2 2 3 3 scriptdir=`dirname "$BASH_SOURCE"` 4 4 5 -if [[ "$OSTYPE" == "darwin"* ]]; then 6 - libname=libSQLite.Interop.dylib 7 -else 8 - libname=libSQLite.Interop.so 9 -fi 10 - 11 5 if [[ -z "$SQLITE_NET_YEAR" ]]; then 12 6 SQLITE_NET_YEAR=2013 13 7 fi 14 8 15 9 pushd "$scriptdir/.." 16 -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 "$@" 10 +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 "$@" 17 11 popd
Changes to Setup/run-netstandard20-tests-debug.sh.
15 15 pushd "$scriptdir/.." 16 16 17 17 SQLITE_INTEROP_DIR=bin/$SQLITE_NET_YEAR/Debug$SQLITE_NET_CONFIGURATION_SUFFIX/bin 18 18 SQLITE_INTEROP_FILE=$SQLITE_INTEROP_DIR/$libname 19 19 20 20 if [[ -f "${SQLITE_INTEROP_FILE}" ]]; then 21 21 cp "$SQLITE_INTEROP_FILE" "$SQLITE_INTEROP_DIR/SQLite.Interop.dll" 22 + libname=SQLite.Interop.dll 22 23 fi 23 24 24 -libname=SQLite.Interop.dll 25 - 26 -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 "$@" 25 +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 "$@" 27 26 28 27 popd
Changes to Setup/run-netstandard20-tests-release.sh.
15 15 pushd "$scriptdir/.." 16 16 17 17 SQLITE_INTEROP_DIR=bin/$SQLITE_NET_YEAR/Release$SQLITE_NET_CONFIGURATION_SUFFIX/bin 18 18 SQLITE_INTEROP_FILE=$SQLITE_INTEROP_DIR/$libname 19 19 20 20 if [[ -f "${SQLITE_INTEROP_FILE}" ]]; then 21 21 cp "$SQLITE_INTEROP_FILE" "$SQLITE_INTEROP_DIR/SQLite.Interop.dll" 22 + libname=SQLite.Interop.dll 22 23 fi 23 24 24 -libname=SQLite.Interop.dll 25 - 26 -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 "$@" 25 +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 "$@" 27 26 28 27 popd
Changes to lib/System.Data.SQLite/common.eagle.
597 597 598 598 # 599 599 # NOTE: If the test suite cannot use [exec] or execution of CorFlags 600 600 # failed, return false. 601 601 # 602 602 return false 603 603 } 604 + 605 + proc isDarwin {} { 606 + return [expr { 607 + [info exists ::tcl_platform(os)] && $::tcl_platform(os) eq "Darwin" 608 + }] 609 + } 604 610 605 611 proc getNativeLibraryFileNamesOnly {} { 606 612 # 607 613 # NOTE: First, check if the list of native library file names has been 608 614 # manually overridden. 609 615 # 610 616 if {[info exists ::native_library_file_names] && \ ................................................................................ 612 618 # 613 619 # NOTE: The list of native library file names has been overridden; 614 620 # therefore, use it verbatim. 615 621 # 616 622 return $::native_library_file_names 617 623 } elseif {[isWindows]} then { 618 624 # 619 - # NOTE: Otherwise, on Windows, always use the default file name 620 - # "sqlite3.dll". 625 + # NOTE: Otherwise, on Win32 always use the standard native library 626 + # file name "sqlite3.dll". 627 + # 628 + return [list sqlite3.dll] 629 + } elseif {[isDotNetCore]} then { 630 + # 631 + # When running on .NET Core, return the same native library 632 + # file name that is used on Windows (i.e. otherwise, assume 633 + # we are running on Mono and use its P/Invoke conventions). 621 634 # 622 635 return [list sqlite3.dll] 636 + } elseif {[isDarwin]} then { 637 + # 638 + # NOTE: When running on Darwin (i.e. the kernel of iOS / Mac OS X), 639 + # return the Mac OS X native library file name. This file 640 + # name is normally required for Mono. 641 + # 642 + return [list libsqlite3.dylib] 623 643 } else { 624 644 # 625 - # NOTE: Otherwise, return both the generic POSIX file name and the 626 - # Mac OS X file name, since we do not currently have an easy 627 - # way to detect which of those platforms we are running on. 645 + # NOTE: Otherwise, return the generic POSIX native library file 646 + # name. This file name is normally required for Mono. 628 647 # 629 - return [list libsqlite3.dylib libsqlite3.so] 648 + return [list libsqlite3.so] 630 649 } 631 650 } 632 651 633 652 proc getInteropAssemblyFileNamesOnly {} { 634 653 # 635 654 # NOTE: First, check if the list of interop assembly file names has been 636 655 # manually overridden. ................................................................................ 640 659 # 641 660 # NOTE: The list of interop assembly file names has been overridden; 642 661 # therefore, use it verbatim. 643 662 # 644 663 return $::interop_assembly_file_names 645 664 } elseif {[isWindows]} then { 646 665 # 647 - # NOTE: Otherwise, on Windows, always use the default file name 648 - # "SQLite.Interop.dll". 666 + # NOTE: Otherwise, on Win32, always use the interop assembly file 667 + # name "SQLite.Interop.dll". 668 + # 669 + return [list SQLite.Interop.dll] 670 + } elseif {[isDotNetCore]} then { 671 + # 672 + # When running on .NET Core, return the same interp assembly 673 + # file name that is used on Windows (i.e. otherwise, assume 674 + # we are running on Mono and use its P/Invoke conventions). 649 675 # 650 676 return [list SQLite.Interop.dll] 677 + } elseif {[isDarwin]} then { 678 + # 679 + # NOTE: When running on Darwin (i.e. the kernel of iOS / Mac OS X), 680 + # return the Mac OS X interp assembly file name. This file 681 + # name is normally required for Mono. 682 + # 683 + return [list libSQLite.Interop.dylib] 651 684 } else { 652 685 # 653 - # NOTE: Otherwise, return both the generic POSIX file name and the 654 - # Mac OS X file name, since we do not currently have an easy 655 - # way to detect which of those platforms we are running on. 686 + # NOTE: Otherwise, return the generic POSIX interp assembly file 687 + # name. This file name is normally required for Mono. 656 688 # 657 - return [list libSQLite.Interop.dylib libSQLite.Interop.so] 689 + return [list libSQLite.Interop.so] 658 690 } 659 691 } 660 692 661 693 proc getCoreExtensionBinaryFileName { {default ""} } { 662 694 set fileName [getCoreBinaryFileName] 663 695 664 696 if {[file exists $fileName]} then {