Skip to content

Commit 70b92e7

Browse files
author
Vincent Rouillé
committed
allow running bindingtester with different api versions
1 parent ec49acf commit 70b92e7

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

foundationdb-bindingtester/Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,19 @@ categories = ["database"]
1919

2020
license = "MIT/Apache-2.0"
2121

22+
[features]
23+
default = ["fdb-6_1"]
24+
# Use the locally embedded foundationdb fdb_c.h and fdb.options files
25+
embedded-fdb-include = [ "foundationdb/embedded-fdb-include" ]
26+
fdb-5_1 = [ "foundationdb/fdb-5_1" ]
27+
fdb-5_2 = [ "foundationdb/fdb-5_2" ]
28+
fdb-6_0 = [ "foundationdb/fdb-6_0" ]
29+
fdb-6_1 = [ "foundationdb/fdb-6_1" ]
30+
fdb-6_2 = [ "foundationdb/fdb-6_2" ]
31+
2232
[dependencies]
2333
env_logger = "0.7.1"
24-
foundationdb = { path = "../foundationdb", features = ["uuid", "num-bigint"] }
34+
foundationdb = { path = "../foundationdb", features = ["uuid", "num-bigint"], default-features = false }
2535
foundationdb-sys = { version = "0.5.0", path = "../foundationdb-sys", default-features = false }
2636
futures = "0.3.0"
2737
log = "0.4.8"

foundationdb-bindingtester/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ static RESULT_NOT_PRESENT: Element = Element::Bytes(Bytes(Cow::Borrowed(b"RESULT
2323
static GOT_READ_VERSION: Element = Element::Bytes(Bytes(Cow::Borrowed(b"GOT_READ_VERSION")));
2424
static GOT_COMMITTED_VERSION: Element =
2525
Element::Bytes(Bytes(Cow::Borrowed(b"GOT_COMMITTED_VERSION")));
26-
static GOT_APPROXIMATE_SIZE: Element =
27-
Element::Bytes(Bytes(Cow::Borrowed(b"GOT_APPROXIMATE_SIZE")));
26+
2827
static ERROR_NONE: Element = Element::Bytes(Bytes(Cow::Borrowed(b"ERROR: NONE")));
2928
static ERROR_MULTIPLE: Element = Element::Bytes(Bytes(Cow::Borrowed(b"ERROR: MULTIPLE")));
3029
static OK: Element = Element::Bytes(Bytes(Cow::Borrowed(b"OK")));
3130

31+
#[cfg(feature = "fdb-6_2")]
32+
static GOT_APPROXIMATE_SIZE: Element =
33+
Element::Bytes(Bytes(Cow::Borrowed(b"GOT_APPROXIMATE_SIZE")));
34+
3235
use crate::fdb::options::{MutationType, StreamingMode};
3336
use tuple::VersionstampOffset;
3437
fn mutation_from_str(s: &str) -> MutationType {

0 commit comments

Comments
 (0)