-
Notifications
You must be signed in to change notification settings - Fork 29
/
run_bindingtester.sh
executable file
·38 lines (32 loc) · 1.05 KB
/
run_bindingtester.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/bash -e
set -x
fdb_rs_dir=$(pwd)
bindingtester="${fdb_rs_dir:?}/$1"
case $(uname) in
Darwin)
brew install mono
;;
Linux)
sudo apt update
sudo apt install mono-devel -y
;;
*) echo "only macOS or Ubuntu is supported"
esac
## build the python bindings
(
fdb_builddir=${fdb_rs_dir:?}/target/foundationdb_build
mkdir -p ${fdb_builddir:?}
cd ${fdb_builddir:?}
## Get foundationdb source
git clone --depth 1 https://github.com/apple/foundationdb.git -b release-6.1
cd foundationdb
git checkout release-6.1
## need the python api bindings
make fdb_python
## Run the test
echo "testers['rust'] = Tester('rust', '${bindingtester}', 2040, 23, MAX_API_VERSION, types=ALL_TYPES)
" >> ./bindings/bindingtester/known_testers.py
./bindings/bindingtester/bindingtester.py --test-name scripted rust
./bindings/bindingtester/bindingtester.py --num-ops 1000 --api-version 610 --test-name api --compare python rust
./bindings/bindingtester/bindingtester.py --num-ops 1000 --api-version 610 --test-name api --concurrency 5 rust
)