Skip to content

Commit

Permalink
zapped a few more tools/odbc instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Hannes Mühleisen committed May 1, 2024
1 parent 0723b2b commit 4d3bba6
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ODBC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
run: |
zip -j duckdb_odbc-osx-universal.zip build/release/tools/odbc/libduckdb_odbc.dylib
zip -j duckdb_odbc-osx-universal.zip build/release/libduckdb_odbc.dylib
./scripts/upload-assets-to-staging.sh github_release libduckdb-osx-universal.zip duckdb_cli-osx-universal.zip duckdb_odbc-osx-universal.zip
- uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ BUILD_ODBC=1 DISABLE_SANITIZER=1 make debug -j
The ODBC tests are written with the catch framework. To run the tests, run the following command from the main DuckDB repository:

```bash
build/debug/tools/odbc/test/test_odbc
build/debug/test/test_odbc
```

You can also individually run the tests by specifying the test name as an argument to the test executable:

```bash
build/debug/tools/odbc/test/test_odbc 'Test ALTER TABLE statement'
build/debug/test/test_odbc 'Test ALTER TABLE statement'
```
2 changes: 1 addition & 1 deletion test/julia-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ODBC.setunixODBC(;ODBCSYSINI=home, ODBCINSTINI=".odbcinst.ini", ODBCINI=string(h
conn=ODBC.Connection("DSN=DuckDB;")

duckdb_dir = pwd()
DBInterface.execute(conn,"CREATE TABLE test AS SELECT * FROM read_csv_auto('" * duckdb_dir * "/tools/odbc/test/test.csv')")
DBInterface.execute(conn,"CREATE TABLE test AS SELECT * FROM read_csv_auto('" * duckdb_dir * "test/test.csv')")

df1 = DBInterface.execute(conn,"SELECT sum(a) as a, sum(b) as b, sum(c) as c FROM test")|>DataFrame
df2 = DataFrame(a = Float64(3.3), b = Float64(36.0), c = Float64(1.0));
Expand Down
2 changes: 1 addition & 1 deletion test/rodbc.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ install.packages(c("odbc", "DBI"), repos="https://cloud.r-project.org/", lib=tem
library("DBI", lib.loc=tempdir())
library("odbc", lib.loc=tempdir())

con <- dbConnect(odbc(), database=":memory:", driver=Sys.glob("build/debug/tools/odbc/libduckdb_odbc.*"))
con <- dbConnect(odbc(), database=":memory:", driver=Sys.glob("build/debug/libduckdb_odbc.*"))

dbExecute(con, "CREATE TABLE fuu (i INTEGER, j STRING)")
dbExecute(con, "INSERT INTO fuu VALUES (42, 'Hello'), (43, 'World'), (NULL, NULL)")
Expand Down
8 changes: 4 additions & 4 deletions test/run_isql_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

#echo -e "[ODBC]\nTrace = yes\nTraceFile = /tmp/odbctrace\n\n[DuckDB Driver]\nDriver = "$(pwd)"/build/debug/tools/odbc/libduckdb_odbc.so" > ~/.odbcinst.ini
#echo -e "[ODBC]\nTrace = yes\nTraceFile = /tmp/odbctrace\n\n[DuckDB Driver]\nDriver = "$(pwd)"/build/debug/libduckdb_odbc.so" > ~/.odbcinst.ini
#echo -e "[DuckDB]\nDriver = DuckDB Driver\nDatabase=test.db\n" > ~/.odbc.ini

BASE_DIR=$(dirname $0)
Expand All @@ -12,17 +12,17 @@ if test -f test.db; then
fi

#Configuring ODBC files
$BASE_DIR/../linux_setup/unixodbc_setup.sh -u -db test.db -D $(pwd)/build/debug/tools/odbc/libduckdb_odbc.so
$BASE_DIR/../linux_setup/unixodbc_setup.sh -u -db test.db -D $(pwd)/build/debug/libduckdb_odbc.so

export ASAN_OPTIONS=verify_asan_link_order=0

python tools/odbc/test/isql-test.py isql
python test/isql-test.py isql
if [[ $? != 0 ]]; then
exit 1;
fi

# running isql with the option -e
rm test.db && python tools/odbc/test/isql-test.py isql -e
rm test.db && python test/isql-test.py isql -e
if [[ $? != 0 ]]; then
exit 1;
fi
4 changes: 2 additions & 2 deletions test/run_nanodbc_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e

#echo -e "[ODBC]\nTrace = yes\nTraceFile = /tmp/odbctrace\n\n[DuckDB Driver]\nDriver = "$(pwd)"/build/debug/tools/odbc/libduckdb_odbc.so" > ~/.odbcinst.ini
#echo -e "[ODBC]\nTrace = yes\nTraceFile = /tmp/odbctrace\n\n[DuckDB Driver]\nDriver = "$(pwd)"/build/debug/libduckdb_odbc.so" > ~/.odbcinst.ini
#echo -e "[DuckDB]\nDriver = DuckDB Driver\nDatabase=:memory:\n" > ~/.odbc.ini

BASE_DIR=$(dirname $0)
Expand All @@ -22,7 +22,7 @@ case "$(uname -s)" in
;;
esac

$BASE_DIR/../linux_setup/unixodbc_setup.sh -u -D $(pwd)/build/debug/tools/odbc/libduckdb_odbc.${extension}
$BASE_DIR/../linux_setup/unixodbc_setup.sh -u -D $(pwd)/build/debug/libduckdb_odbc.${extension}

export NANODBC_TEST_CONNSTR_ODBC="DRIVER=DuckDB Driver;"
export ASAN_OPTIONS=verify_asan_link_order=0
Expand Down
6 changes: 3 additions & 3 deletions test/run_pyodbc_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

set -e

#echo -e "[ODBC]\nTrace = yes\nTraceFile = /tmp/odbctrace\n\n[DuckDB Driver]\nDriver = "$(pwd)"/build/debug/tools/odbc/libduckdb_odbc.so" > ~/.odbcinst.ini
#echo -e "[ODBC]\nTrace = yes\nTraceFile = /tmp/odbctrace\n\n[DuckDB Driver]\nDriver = "$(pwd)"/build/debug/libduckdb_odbc.so" > ~/.odbcinst.ini
#echo -e "[DuckDB]\nDriver = DuckDB Driver\nDatabase=:memory:\n" > ~/.odbc.ini

BASE_DIR=$(dirname $0)

#Configuring ODBC files
$BASE_DIR/../linux_setup/unixodbc_setup.sh -u -D $(pwd)/build/debug/tools/odbc/libduckdb_odbc.so
$BASE_DIR/../linux_setup/unixodbc_setup.sh -u -D $(pwd)/build/debug/libduckdb_odbc.so

export ASAN_OPTIONS=verify_asan_link_order=0

python3 tools/odbc/test/pyodbc-test.py
python3 test/pyodbc-test.py
if [[ $? != 0 ]]; then
exit 1;
fi
2 changes: 1 addition & 1 deletion test/tests/connect_with_ini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using namespace odbc_test;

// If running this test on macOS you need to run the following script before executing the test
// tools/odbc/scripts/create_ini_file.sh
// scripts/create_ini_file.sh

// Connect to the database using the ini file
TEST_CASE("Test SQLConnect with Ini File", "[odbc]") {
Expand Down

0 comments on commit 4d3bba6

Please sign in to comment.