Skip to content

Commit

Permalink
Running SQLancer on PRs (#708)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannes committed Jun 24, 2020
1 parent 97258fc commit c9e32c3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 11 deletions.
27 changes: 26 additions & 1 deletion .travis.yml
Expand Up @@ -350,6 +350,30 @@ matrix:
# - $SCMD /home/duckdb/build/test/unittest "~[copy]~[sqlitelogic]~[sqlserver]~[parquet]~[.]"


# Fuzzing
- os: linux
dist: bionic
name: SQLancer
if: (type = push AND branch = master) OR type = pull_request OR tag =~ /^v\d+\.\d+\.\d+$/

addons:
apt:
packages:
- g++-9 openjdk-11-jdk openjdk-11-jre

env:
- JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64'

script:
- export PATH=$JAVA_HOME/bin:$PATH
- mkdir -p build/release
- (cd build/release && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DJDBC_DRIVER=1 -DBUILD_UNITTESTS=FALSE ../.. && cmake --build .)
- java -cp build/release/tools/jdbc/duckdb_jdbc.jar org.duckdb.test.TestDuckDBJDBC
- git clone https://github.com/sqlancer/sqlancer.git
- (cd sqlancer && mvn package)
- cp build/release/tools/jdbc/duckdb_jdbc.jar sqlancer/target/lib/duckdb_jdbc-*.jar
- java -jar sqlancer/target/SQLancer-*.jar --num-queries 1000 --num-threads 1 --random-seed 0 --timeout-seconds 600 duckdb

# APIs: jdbc/ r / python packages

- os: linux
Expand All @@ -366,12 +390,13 @@ matrix:

script:
- mkdir -p build/release
- (cd build/release && cmake -DCMAKE_BUILD_TYPE=Release -DJDBC_DRIVER=1 ../.. && cmake --build .)
- (cd build/release && cmake -DCMAKE_BUILD_TYPE=Release -DJDBC_DRIVER=1 -DBUILD_UNITTESTS=FALSE ../.. && cmake --build .)
- java -cp build/release/tools/jdbc/duckdb_jdbc.jar org.duckdb.test.TestDuckDBJDBC
- git clone https://github.com/cwida/jdbccts.git
- (cd jdbccts && make DUCKDB_JAR=../build/release/tools/jdbc/duckdb_jdbc.jar test)



- os: linux
name: R Package

Expand Down
14 changes: 10 additions & 4 deletions CMakeLists.txt
Expand Up @@ -266,13 +266,19 @@ endif()

add_subdirectory(extension)
add_subdirectory(src)
add_subdirectory(third_party)
add_subdirectory(test)
add_subdirectory(tools)
if(NOT WIN32 AND NOT SUN)

option(BUILD_UNITTESTS "Build the C++ Unit Tests." TRUE)
if(${BUILD_UNITTESTS})
add_subdirectory(test)
if(NOT WIN32 AND NOT SUN)
add_subdirectory(benchmark)
endif()
endif()

add_subdirectory(third_party)
add_subdirectory(tools)


# Write the export set for build and install tree
install(EXPORT "${DUCKDB_EXPORT_SET}" DESTINATION "${INSTALL_CMAKE_DIR}")
export(EXPORT "${DUCKDB_EXPORT_SET}"
Expand Down
2 changes: 1 addition & 1 deletion third_party/CMakeLists.txt
Expand Up @@ -11,7 +11,7 @@ if(NOT AMALGAMATION_BUILD)

endif()

if(NOT WIN32 AND NOT SUN)
if(NOT WIN32 AND NOT SUN AND ${BUILD_UNITTESTS})
add_subdirectory(imdb)
add_subdirectory(dbgen)
add_subdirectory(dsdgen)
Expand Down
7 changes: 4 additions & 3 deletions tools/rest/CMakeLists.txt
Expand Up @@ -10,6 +10,7 @@ if(${BUILD_SUN})
endif()

target_link_libraries(duckdb_rest_server duckdb_static Threads::Threads ${LINK_EXTRA})

add_executable(duckdb_dbgen dbgen.cpp)
target_link_libraries(duckdb_dbgen dbgen duckdb_static)
if(${BUILD_UNITTESTS})
add_executable(duckdb_dbgen dbgen.cpp)
target_link_libraries(duckdb_dbgen dbgen duckdb_static)
endif()
3 changes: 1 addition & 2 deletions tools/rpkg/DESCRIPTION
@@ -1,8 +1,7 @@
Package: duckdb
Title: DBI Package for the DuckDB Database Management System
Version: 0.2.0
Authors@R: c(person(given = "DuckDB Contributors", role = "aut"),
person("Hannes", "M\u00fchleisen", role = c("aut", "cre"), email = "hannes@cwi.nl", comment = c(ORCID = "0000-0001-8552-0029")))
Authors@R: c(person("Hannes", "M\u00fchleisen", role = c("aut", "cre"), email = "hannes@cwi.nl", comment = c(ORCID = "0000-0001-8552-0029")), person("Mark", "Raasveldt", role = c("aut"), email = "mark.raasveldt@cwi.nl", comment = c(ORCID = "0000-0001-5005-6844")), person(given = "DuckDB Contributors", role = "aut"))
Description: DuckDB is an embedded analytical data management system with SQL support. This package includes all of DuckDB as well as R DBI & dplyr connectors.
Depends:
R (>= 3.5.0),
Expand Down

0 comments on commit c9e32c3

Please sign in to comment.