How to build
Clone repo
git clone --recurse-submodules git@github.com:luohaha/BlockDuck.git
--recurse-submodulesis need because BlockDuck has two submodules.
Managing dependencies
Currently, BlockDuck have only one dependency which is openssl. And we use VCPKG to manage this dependency. You can run the following cmds to install and enable VCPKG.
cd <your-working-dir-not-the-plugin-repo>
git clone https://github.com/Microsoft/vcpkg.git
sh ./vcpkg/scripts/bootstrap.sh -disableMetrics
export VCPKG_TOOLCHAIN_PATH=`pwd`/vcpkg/scripts/buildsystems/vcpkg.cmakeCompile
Then we can use make to build the extension:
makeThe BlockDuck extension binary will be:
./build/release/extension/blockduck/blockduck.duckdb_extensionTests
In BlockDuck, there are three types of test cases:
Sqllogictest
run sqllogictest:
make testUnitTest
build and run unittest:
cd unittest/
cmake .
make
./BlockDuckTestsCorrectnessTest
Run all tests
cd correctness_test/
python run_tests.pyRun tests by filter
cd correctness_test/
python -m unittest discover -s tests -p "test_eth_transactions.py"
python -m unittest discover -s tests -p "test_*.py"Last updated