Print this page
4620 Add OmniOS as a runnable usr/src/test distro

Split Close
Expand all
Collapse all
          --- old/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh
          +++ new/usr/src/test/zfs-tests/cmd/scripts/zfstest.ksh
↓ open down ↓ 5 lines elided ↑ open up ↑
   6    6  # You may only use this file in accordance with the terms of version
   7    7  # 1.0 of the CDDL.
   8    8  #
   9    9  # A full copy of the text of the CDDL should have accompanied this
  10   10  # source.  A copy of the CDDL is also available via the Internet at
  11   11  # http://www.illumos.org/license/CDDL.
  12   12  #
  13   13  
  14   14  #
  15   15  # Copyright (c) 2012 by Delphix. All rights reserved.
       16 +# Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved.
  16   17  #
  17   18  
  18   19  export STF_SUITE="/opt/zfs-tests"
  19   20  export STF_TOOLS="/opt/test-runner/stf"
  20   21  runner="/opt/test-runner/bin/run"
  21   22  auto_detect=false
  22   23  
  23   24  function fail
  24   25  {
  25   26          echo $1
↓ open down ↓ 25 lines elided ↑ open up ↑
  51   52          echo ${ds%%/*}
  52   53  }
  53   54  
  54   55  function find_runfile
  55   56  {
  56   57          typeset distro=
  57   58          if [[ -d /opt/delphix && -h /etc/delphix/version ]]; then
  58   59                  distro=delphix
  59   60          elif [[ 0 -ne $(grep -c OpenIndiana /etc/release 2>/dev/null) ]]; then
  60   61                  distro=openindiana
       62 +        elif [[ 0 -ne $(grep -c OmniOS /etc/release 2>/dev/null) ]]; then
       63 +                distro=omnios
  61   64          fi
  62   65  
  63   66          [[ -n $distro ]] && echo $STF_SUITE/runfiles/$distro.run
  64   67  }
  65   68  
  66   69  function verify_id
  67   70  {
  68   71          [[ $(id -u) = "0" ]] && fail "This script must not be run as root."
  69   72  
  70   73          sudo -n id >/dev/null 2>&1
↓ open down ↓ 63 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX