-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.rs
71 lines (65 loc) · 1.81 KB
/
tests.rs
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright 2016 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.
#![allow(stable_features)]
#![feature(mpsc_recv_timeout)]
#![feature(plugin)]
#![feature(test)]
#![cfg_attr(feature = "dev", plugin(clippy))]
#![cfg_attr(not(feature = "dev"), allow(unknown_lints))]
#![feature(btree_range, collections_bound)]
#![feature(box_syntax)]
#![feature(fnbox)]
#![allow(new_without_default)]
#![feature(const_fn)]
#[macro_use]
extern crate log;
extern crate protobuf;
#[macro_use]
extern crate tikv;
extern crate rand;
extern crate rocksdb;
extern crate tempdir;
extern crate uuid;
extern crate mio;
extern crate kvproto;
extern crate tipb;
extern crate time;
extern crate rustc_serialize;
extern crate test;
mod test_raft;
mod test_raft_snap;
mod test_raft_paper;
mod test_raft_flow_control;
mod test_raw_node;
mod raftstore;
mod coprocessor;
mod storage;
mod util;
mod pd;
use std::env;
#[test]
fn _0_travis_setup() {
// Set up travis test fail case log.
// The prefix "_" here is to guarantee running this case first.
if env::var("TRAVIS").is_ok() && env::var("LOG_FILE").is_ok() {
self::util::init_log();
}
}
#[test]
fn _1_check_system_requirement() {
if let Err(e) = tikv::util::config::check_max_open_fds(2000) {
panic!("To run test, please make sure the maximum number of open file descriptors not \
less than 2000: {:?}",
e);
}
}