]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/librados: use GTEST_SKIP() to skip test
authorKefu Chai <kchai@redhat.com>
Wed, 22 Jan 2020 02:49:00 +0000 (10:49 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 22 Jan 2020 02:52:47 +0000 (10:52 +0800)
the output would look like

```
[  SKIPPED ] SkipTest.DoesSkip (0 ms)
```

easier for tester/developer to review the test result.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/librados/tier_cxx.cc

index a9f4e490c654e2f9c8657412404bb7fda0dca6f9..42c03c278e92ea875285c5059e56da66dcaa888f 100644 (file)
@@ -2979,8 +2979,7 @@ TEST_F(LibRadosTwoPoolsPP, SetRedirectRead) {
 TEST_F(LibRadosTwoPoolsPP, SetChunkRead) {
   // skip test if not yet mimic
   if (_get_required_osd_release(cluster) < "mimic") {
-    cout << "cluster is not yet mimic, skipping test" << std::endl;
-    return;
+    GTEST_SKIP() << "cluster is not yet mimic, skipping test";
   }
 
   // create object
@@ -3050,8 +3049,7 @@ TEST_F(LibRadosTwoPoolsPP, SetChunkRead) {
 TEST_F(LibRadosTwoPoolsPP, ManifestPromoteRead) {
   // skip test if not yet mimic
   if (_get_required_osd_release(cluster) < "mimic") {
-    cout << "cluster is not yet mimic, skipping test" << std::endl;
-    return;
+    GTEST_SKIP() << "cluster is not yet mimic, skipping test";
   }
 
   // create object
@@ -3247,8 +3245,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestRefRead) {
 TEST_F(LibRadosTwoPoolsPP, ManifestUnset) {
   // skip test if not yet nautilus
   if (_get_required_osd_release(cluster) < "nautilus") {
-    cout << "cluster is not yet nautilus, skipping test" << std::endl;
-    return;
+    GTEST_SKIP() << "cluster is not yet nautilus, skipping test";
   }
 
   // create object
@@ -3391,8 +3388,7 @@ using ceph::crypto::SHA1;
 TEST_F(LibRadosTwoPoolsPP, ManifestDedupRefRead) {
   // skip test if not yet nautilus
   if (_get_required_osd_release(cluster) < "nautilus") {
-    cout << "cluster is not yet nautilus, skipping test" << std::endl;
-    return;
+    GTEST_SKIP() << "cluster is not yet nautilus, skipping test";
   }
 
   bufferlist inbl;
@@ -3519,8 +3515,7 @@ TEST_F(LibRadosTwoPoolsPP, ManifestDedupRefRead) {
 TEST_F(LibRadosTwoPoolsPP, ManifestFlushRead) {
   // skip test if not yet octopus 
   if (_get_required_osd_release(cluster) < "octopus") {
-    cout << "cluster is not yet octopus, skipping test" << std::endl;
-    return;
+    GTEST_SKIP() << "cluster is not yet octopus, skipping test";
   }
 
   // create object