1# 2# Environment variables for a single machine test. We look for the 3# following environment variables: 4# 5# $TEST_SERVER The SMB server to contact for the test 6# $TEST_SHARE Share name on $TEST_SERVER to contact 7# $TEST_USER The username to connect to $TEST_SHARE as 8# 9# These are stored in the Tcl variables $server, $share and $user 10# respectively. 11# 12# An error will be produced and the test will exit if any of these 13# variables are not present. 14# 15 16verbose "Loading single machine environment variables" 17 18catch {set server "$env(TEST_SERVER)"} tmp 19 20if {[regexp "^can't read" $tmp]} { 21 error "Environment variable TEST_SERVER not set" 22} 23 24catch {set share "$env(TEST_SHARE)"} tmp 25 26if {[regexp "^can't read" $tmp]} { 27 error "Environment variable TEST_SHARE not set" 28} 29 30catch {set user "$env(TEST_USER)"} tmp 31 32if {[regexp "^can't read" $tmp]} { 33 error "Environment variable TEST_USER not set" 34} 35 36verbose "Single machine is //$server/$share -U $user" 37