Skip to content

Commit

Permalink
Fix travis builds
Browse files Browse the repository at this point in the history
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
  • Loading branch information
igorcanadi committed Sep 4, 2014
1 parent a481626 commit 51ea889
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 6 additions & 2 deletions util/env_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 51ea889

Please sign in to comment.