|
Packit |
857059 |
# BEGIN_ICS_COPYRIGHT8 ****************************************
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# Copyright (c) 2015-2017, Intel Corporation
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# Redistribution and use in source and binary forms, with or without
|
|
Packit |
857059 |
# modification, are permitted provided that the following conditions are met:
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# * Redistributions of source code must retain the above copyright notice,
|
|
Packit |
857059 |
# this list of conditions and the following disclaimer.
|
|
Packit |
857059 |
# * Redistributions in binary form must reproduce the above copyright
|
|
Packit |
857059 |
# notice, this list of conditions and the following disclaimer in the
|
|
Packit |
857059 |
# documentation and/or other materials provided with the distribution.
|
|
Packit |
857059 |
# * Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit |
857059 |
# may be used to endorse or promote products derived from this software
|
|
Packit |
857059 |
# without specific prior written permission.
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit |
857059 |
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit |
857059 |
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Packit |
857059 |
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
Packit |
857059 |
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Packit |
857059 |
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Packit |
857059 |
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Packit |
857059 |
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Packit |
857059 |
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
857059 |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
857059 |
#
|
|
Packit |
857059 |
# END_ICS_COPYRIGHT8 ****************************************
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# [ICS VERSION STRING: unknown]
|
|
Packit |
857059 |
|
|
Packit |
857059 |
source /usr/lib/opa/tools/ibtools.exp
|
|
Packit |
857059 |
source "/usr/lib/opa/tools/ff_function.exp"
|
|
Packit |
857059 |
|
|
Packit |
857059 |
#=============================================================================#
|
|
Packit |
857059 |
# Test Suite Description:
|
|
Packit |
857059 |
#-----------------------------------------------------------------------------#
|
|
Packit |
857059 |
## sacache
|
|
Packit |
857059 |
## -------
|
|
Packit |
857059 |
## confirm all hosts have full list of hosts in their sacache
|
|
Packit |
857059 |
#=============================================================================#
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# manditory setup
|
|
Packit |
857059 |
log_user 0; # disable detailed logging to stdout
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# uncomment the following to debug the test
|
|
Packit |
857059 |
#strace 20
|
|
Packit |
857059 |
#log_user 1
|
|
Packit |
857059 |
#exp_internal 1
|
|
Packit |
857059 |
#cmd_trace on
|
|
Packit |
857059 |
#strace 4
|
|
Packit |
857059 |
|
|
Packit |
857059 |
proc suite_setup {} {
|
|
Packit |
857059 |
# example of conditional setup
|
|
Packit |
857059 |
#test_execute {load populate} {
|
|
Packit |
857059 |
#do some installation or configuration stuff
|
|
Packit |
857059 |
#}
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
proc case_setup {} {
|
|
Packit |
857059 |
# setup to do at start of each test case
|
|
Packit |
857059 |
# Usage:
|
|
Packit |
857059 |
# pass as argument to start_suite
|
|
Packit |
857059 |
# Arguments:
|
|
Packit |
857059 |
# None
|
|
Packit |
857059 |
# This procedure will be run at the start of every test case
|
|
Packit |
857059 |
# It provides an opportunity for uniform cleanup/setup for each test case
|
|
Packit |
857059 |
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
proc case_cleanup { failed } {
|
|
Packit |
857059 |
# cleanup to do after each test case
|
|
Packit |
857059 |
# Usage:
|
|
Packit |
857059 |
# pass as argument to start_suite
|
|
Packit |
857059 |
# Arguments:
|
|
Packit |
857059 |
# failed - set to 1 if test case failed in which case additional
|
|
Packit |
857059 |
# information/files may be desired in test_tmp
|
|
Packit |
857059 |
# set to 0 if test case passed
|
|
Packit |
857059 |
# This procedure will be run at the end of every test case
|
|
Packit |
857059 |
# It provides an opportunity for uniform cleanup after each test case
|
|
Packit |
857059 |
global env
|
|
Packit |
857059 |
|
|
Packit |
857059 |
test_execute {} {
|
|
Packit |
857059 |
if { $failed || [ test_save_temp ] } {
|
|
Packit |
857059 |
# save any logs/results from system(s) under test
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
test_suite "sacache" "sacache" "confirm sacache has paths to all hosts
|
|
Packit |
857059 |
File: /usr/lib/opa/tools/sacache.exp" suite_setup noop {
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Global Initializations for Test Suite:
|
|
Packit |
857059 |
# --------------------------------------
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# ADD ANY GLOBAL INITIALIZATION HERE, SUCH AS:
|
|
Packit |
857059 |
# set env(MY_ENV_VAR) value
|
|
Packit |
857059 |
# also validate the environment
|
|
Packit |
857059 |
# if the environment is bad call fail_suite "information" abort_now
|
|
Packit |
857059 |
# abort_now should be 0 if it is safe to proceed and simply ignore all
|
|
Packit |
857059 |
# test_case calls. it should be 1 if that is not possible.
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# Procedures used to support Test Suite:
|
|
Packit |
857059 |
# --------------------------------------
|
|
Packit |
857059 |
|
|
Packit |
857059 |
# The actual test cases:
|
|
Packit |
857059 |
# ----------------------
|
|
Packit |
857059 |
set hosts {}
|
|
Packit |
857059 |
foreach host $env(CFG_HOSTS) {
|
|
Packit |
857059 |
lappend hosts [ff_host_basename $host]
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
|
|
Packit |
857059 |
parallel host $env(CFG_HOSTS) {
|
|
Packit |
857059 |
test_case_discovered_hosts $host $hosts
|
|
Packit |
857059 |
}
|
|
Packit |
857059 |
}
|