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

Split Close
Expand all
Collapse all
          --- old/usr/src/test/os-tests/cmd/ostest.ksh
          +++ new/usr/src/test/os-tests/cmd/ostest.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 OS_TESTS="/opt/os-tests"
  19   20  runner="/opt/test-runner/bin/run"
  20   21  
  21   22  function fail
  22   23  {
  23   24          echo $1
  24   25          exit ${2:-1}
  25   26  }
  26   27  
  27   28  function find_runfile
  28   29  {
  29   30          typeset distro=
  30   31          if [[ -d /opt/delphix && -h /etc/delphix/version ]]; then
  31   32                  distro=delphix
  32   33          elif [[ 0 -ne $(grep -c OpenIndiana /etc/release 2>/dev/null) ]]; then
  33   34                  distro=openindiana
       35 +        elif [[ 0 -ne $(grep -c OmniOS /etc/release 2>/dev/null) ]]; then
       36 +                distro=omnios
  34   37          fi
  35   38  
  36   39          [[ -n $distro ]] && echo $OS_TESTS/runfiles/$distro.run
  37   40  }
  38   41  
  39   42  while getopts c: c; do
  40   43          case $c in
  41   44          'c')
  42   45                  runfile=$OPTARG
  43   46                  [[ -f $runfile ]] || fail "Cannot read file: $runfile"
↓ open down ↓ 11 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX