xref: /illumos-gate/usr/src/test/smbsrv-tests/cmd/smbsrvtests.ksh (revision fc910014e8a32a65612105835a10995f2c13d942)
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 2022 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 c:o:t: c; do
33	case $c in
34	'c')
35		CFGFILE=$OPTARG
36		[[ -f $CFGFILE ]] || fail "Cannot read file: $CFGFILE"
37		;;
38	'o')
39		OUTDIR=$OPTARG
40		;;
41	't')
42		export TIMEOUT=$OPTARG
43		;;
44	esac
45done
46shift $((OPTIND - 1))
47
48set -x
49
50$SMBSRV_TESTS/tests/smbtorture/runst-smb2
51$SMBSRV_TESTS/tests/smbtorture/runst-rpc
52$SMBSRV_TESTS/tests/smb_sid/large_sids_lib
53$SMBSRV_TESTS/tests/smb_sid/large_sids_kern
54