Merge pull request #58 from mozilla/lmdb-tests

Run lmdb tests alongside `cargo test`
without.crypto
Victor Porof 5 years ago committed by GitHub
commit df2dc926ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      .appveyor.yml
  2. 28
      lmdb-sys/tests/lmdb.rs

@ -17,8 +17,13 @@ install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %TOOLCHAIN%
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
- choco install make -y
- choco install mingw -y
- refreshenv
- rustc -Vv
- cargo -V
- make -v
- gcc -v
build_script:
- git submodule -q update --init

@ -0,0 +1,28 @@
extern crate lmdb_rkv_sys;
use std::env;
use std::path::PathBuf;
use std::process::Command;
#[test]
fn test_lmdb() {
let mut lmdb = PathBuf::from(&env::var("CARGO_MANIFEST_DIR").unwrap());
lmdb.push("lmdb");
lmdb.push("libraries");
lmdb.push("liblmdb");
let make_cmd = Command::new("make")
.current_dir(&lmdb)
.status()
.expect("failed to execute process");
assert_eq!(make_cmd.success(), true);
let make_test_cmd = Command::new("make")
.arg("test")
.current_dir(&lmdb)
.status()
.expect("failed to execute process");
assert_eq!(make_test_cmd.success(), true);
}
Loading…
Cancel
Save