1#!/usr/bin/ksh 2 3# 4# This file and its contents are supplied under the terms of the 5# Common Development and Distribution License ("CDDL"), version 1.0. 6# You may only use this file in accordance with the terms of version 7# 1.0 of the CDDL. 8# 9# A full copy of the text of the CDDL should have accompanied this 10# source. A copy of the CDDL is also available via the Internet at 11# http://www.illumos.org/license/CDDL. 12# 13 14# 15# Copyright 2021 Tintri by DDN, Inc. All rights reserved. 16# 17 18# Run all the smbsrv-tests 19 20export PATH="/usr/bin" 21export SMBSRV_TESTS="/opt/smbsrv-tests" 22 23export CFGFILE=$SMBSRV_TESTS/include/default.cfg 24export OUTDIR=/var/tmp/test_results/smbsrv-tests 25 26function fail 27{ 28 echo $1 29 exit ${2:-1} 30} 31 32while getopts b:c:o:t: c; do 33 case $c in 34 'b') 35 export BASEFILE=$OPTARG 36 [[ -f $BASEFILE ]] || fail "Cannot read file: $BASEFILE" 37 ;; 38 'c') 39 CFGFILE=$OPTARG 40 [[ -f $CFGFILE ]] || fail "Cannot read file: $CFGFILE" 41 ;; 42 'o') 43 OUTDIR=$OPTARG 44 ;; 45 't') 46 export TIMEOUT=$OPTARG 47 ;; 48 esac 49done 50shift $((OPTIND - 1)) 51 52set -x 53 54# Just one test for now. More to come. 55$SMBSRV_TESTS/tests/smbtorture/runst-smb2 56