Skip to content

Commit

Permalink
ci: fix ci on mac (tikv#411)
Browse files Browse the repository at this point in the history
* Fix ci fail on mac
  • Loading branch information
BusyJay authored and ngaut committed Apr 13, 2016
1 parent f72ae30 commit ec4cbea
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ install:
script:
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$rocksdb_dir"
- export LIBRARY_PATH="$LD_LIBRARY_PATH"
- cargo test
- ENABLE_FEATURES=default make test
48 changes: 0 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ git = "https://github.com/pingcap/kvproto"
[dependencies.tipb]
git = "https://github.com/pingcap/tipb.git"

[dev-dependencies]
env_logger = "0.3"

[profile.dev]
opt-level = 0 # Controls the --opt-level the compiler builds with
debug = true # Controls whether the compiler passes `-g`
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
ENABLE_FEATURES ?= dev

.PHONY: all

all: format build test

build:
cargo build --features "dev"
cargo build --features ${ENABLE_FEATURES}

run:
cargo run --features "dev"
cargo run --features ${ENABLE_FEATURES}

release:
cargo build --release --bin tikv-server

test:
# todo remove ulimit once issue #372 of mio is resolved.
ulimit -n 2000 && LOG_LEVEL=DEBUG RUST_BACKTRACE=1 cargo test --features "dev" -- --nocapture
ulimit -n 2000 && LOG_LEVEL=DEBUG RUST_BACKTRACE=1 cargo test --features ${ENABLE_FEATURES} -- --nocapture

bench:
# todo remove ulimit once issue #372 of mio is resolved.
ulimit -n 4096 && LOG_LEVEL=ERROR RUST_BACKTRACE=1 cargo bench --features "dev" -- --nocapture
ulimit -n 4096 && RUST_BACKTRACE=1 cargo run --release --bin bench-tikv --features "dev"
ulimit -n 4096 && LOG_LEVEL=ERROR RUST_BACKTRACE=1 cargo bench --features ${ENABLE_FEATURES} -- --nocapture
ulimit -n 4096 && RUST_BACKTRACE=1 cargo run --release --bin bench-tikv --features ${ENABLE_FEATURES}

genprotobuf:
cd ./src/proto && protoc --rust_out . *.proto
Expand Down
4 changes: 2 additions & 2 deletions src/bin/tikv-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ fn build_raftkv(matches: &Matches,
let path = get_store_path(matches);
let mut opts = rocksdb::Options::new();
let mut block_base_opts = rocksdb::BlockBasedOptions::new();
block_base_opts.set_block_size(64*1024);
block_base_opts.set_block_size(64 * 1024);
opts.set_block_based_table_factory(&block_base_opts);
opts.set_target_file_size_base(64*1024*1024);
opts.set_target_file_size_base(64 * 1024 * 1024);
opts.create_if_missing(true);

let engine = Arc::new(DB::open(&opts, &path).unwrap());
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ extern crate kvproto;
extern crate time;
extern crate tipb;

#[cfg(test)]
extern crate env_logger;

#[macro_use]
pub mod util;
pub mod raft;
Expand Down
1 change: 0 additions & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#[macro_use]
extern crate log;
extern crate protobuf;
extern crate env_logger;
#[macro_use]
extern crate tikv;
extern crate rand;
Expand Down

0 comments on commit ec4cbea

Please sign in to comment.