]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
workunits/ceph-helpers.sh: FreeBSD returns a different errorstring.
authorWillem Jan Withagen <wjw@digiware.nl>
Tue, 15 Nov 2016 11:10:18 +0000 (12:10 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 15 Nov 2016 11:10:18 +0000 (12:10 +0100)
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
qa/workunits/ceph-helpers.sh

index f441830a142c8f3447edf72978674bb020c8ecda..e82de4661254b23ba3d1b16acec72ebacd647412 100755 (executable)
@@ -1285,10 +1285,17 @@ function test_wait_for_scrub() {
 
 function erasure_code_plugin_exists() {
     local plugin=$1
-
     local status
+    local grepstr
+    case `uname` in
+        FreeBSD) grepstr="Cannot open.*$plugin" ;;
+        *) grepstr="$plugin.*No such file" ;;
+    esac
+
     if ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin 2>&1 |
-        grep "$plugin.*No such file" ; then
+        grep "$grepstr" ; then
+        # display why the string was rejected.
+        ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin
         status=1
     else
         status=0