Fix travis builds

Summary:
Lots of travis builds are failing because on EnvPosixTest.RandomAccessUniqueID: https://travis-ci.org/facebook/rocksdb/builds/34400833

This is the result of their environment and not because of RocksDB's bug.

Also note that RocksDB works correctly even though UniqueID feature is not present in the system (as it's the case with os x)

Test Plan:
OPT=-DTRAVIS make env_test && ./env_test
Observed that offending tests are not being run

Reviewers: sdong, yhchiang, ljin

Reviewed By: ljin

Subscribers: leveldb

Differential Revision: https://reviews.facebook.net/D22803
main
Igor Canadi 10 years ago
parent a4816269f1
commit 51ea889002
  1. 3
      .travis.yml
  2. 8
      util/env_test.cc

@ -14,7 +14,6 @@ before_install:
- sudo dpkg -i libgflags-dev_2.0-1_amd64.deb
# Lousy hack to disable use and testing of fallocate, which doesn't behave quite
# as EnvPosixTest::AllocateTest expects within the Travis OpenVZ environment.
- sed -i "s/fallocate(/HACK_NO_fallocate(/" build_tools/build_detect_platform
script: make check -j8
script: OPT=-DTRAVIS make check -j8
notifications:
email: false

@ -392,6 +392,9 @@ TEST(EnvPosixTest, DecreaseNumBgThreads) {
}
#ifdef OS_LINUX
// Travis doesn't support fallocate or getting unique ID from files for whatever
// reason.
#ifndef TRAVIS
// To make sure the Env::GetUniqueId() related tests work correctly, The files
// should be stored in regular storage like "hard disk" or "flash device".
// Otherwise we cannot get the correct id.
@ -507,7 +510,7 @@ TEST(EnvPosixTest, AllocateTest) {
// verify that preallocated blocks were deallocated on file close
ASSERT_GT(st_blocks, f_stat.st_blocks);
}
#endif
#endif // ROCKSDB_FALLOCATE_PRESENT
// Returns true if any of the strings in ss are the prefix of another string.
bool HasPrefix(const std::unordered_set<std::string>& ss) {
@ -638,7 +641,8 @@ TEST(EnvPosixTest, InvalidateCache) {
// Delete the file
ASSERT_OK(env_->DeleteFile(fname));
}
#endif
#endif // not TRAVIS
#endif // OS_LINUX
TEST(EnvPosixTest, PosixRandomRWFileTest) {
EnvOptions soptions;

Loading…
Cancel
Save