diff options
author | Loic Dachary <loic@dachary.org> | 2013-06-25 15:04:34 +0200 |
---|---|---|
committer | Loic Dachary <loic@dachary.org> | 2013-06-25 15:09:57 +0200 |
commit | 6e320a1bd338cd6287a697799dd562548c920f4d (patch) | |
tree | 3d9dfb3129e0f724c31c60702bd8536430f91742 | |
parent | 37a20174fd22a79938ba9c93046e8830f4a3306f (diff) | |
download | ceph-6e320a1bd338cd6287a697799dd562548c920f4d.tar.gz |
skip TEST(EXT4StoreTest, _detect_fs) if DISK or MOUNTPOINT are undefined
The TEST(EXT4StoreTest, _detect_fs) test is meant to be run from
qa/workunits/filestore/filestore.sh, after the ext4 file system was
created. If the DISK and MOUNTPOINT environment variables are not
defined, display a message explaining the expected environment and
silentely skip the test. The tests in store_test.cc are not unit tests
because they depend on their environment.
http://tracker.ceph.com/issues/5312 fixes #5312
Signed-off-by: Loic Dachary <loic@dachary.org>
-rw-r--r-- | src/test/filestore/store_test.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/filestore/store_test.cc b/src/test/filestore/store_test.cc index 08f0b125e3d..abc5c5f1170 100644 --- a/src/test/filestore/store_test.cc +++ b/src/test/filestore/store_test.cc @@ -829,6 +829,10 @@ TEST_F(StoreTest, ColSplitTest3) { // support tests for qa/workunits/filestore/filestore.sh // TEST(EXT4StoreTest, _detect_fs) { + if (::getenv("DISK") == NULL || ::getenv("MOUNTPOINT") == NULL) { + cerr << "SKIP because DISK and MOUNTPOINT environment variables are not set. It is meant to run from qa/workunits/filestore/filestore.sh " << std::endl; + return; + } const string disk(::getenv("DISK")); EXPECT_LT((unsigned)0, disk.size()); const string mnt(::getenv("MOUNTPOINT")); |