2
############################################################################
3
# Purpose: Test of SLURM functionality
6
# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR
7
# "FAILURE: ..." otherwise with an explanation of the failure, OR
8
# anything else indicates a failure mode that must be investigated.
9
############################################################################
10
# Copyright (C) 2008 Lawrence Livermore National Security.
11
# Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
12
# Written by Joseph Donaghy <donaghy1@llnl.gov>
13
# CODE-OCEC-09-009. All rights reserved.
15
# This file is part of SLURM, a resource management program.
16
# For details, see <https://computing.llnl.gov/linux/slurm/>.
17
# Please also read the included file: DISCLAIMER.
19
# SLURM is free software; you can redistribute it and/or modify it under
20
# the terms of the GNU General Public License as published by the Free
21
# Software Foundation; either version 2 of the License, or (at your option)
24
# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
25
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
26
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
29
# You should have received a copy of the GNU General Public License along
30
# with SLURM; if not, write to the Free Software Foundation, Inc.,
31
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32
############################################################################
41
# Use sacctmgr to create a cluster
43
set slurm_conf_matches 0
44
set slurmdbd_conf_matches 0
45
spawn $sacctmgr show config
47
-re "You are not running a supported accounting_storage plugin" {
48
set slurm_conf_matches 2
49
set slurmdbd_conf_matches 2
52
-re "AccountingStorageType *= *accounting_storage/slurmdbd" {
53
incr slurm_conf_matches
56
-re "AccountingStorageType" {
57
incr slurm_conf_matches
58
set slurmdbd_conf_matches 2
62
incr slurm_conf_matches
66
incr slurmdbd_conf_matches
70
incr slurmdbd_conf_matches
74
send_user "\nFAILURE: sacctmgr add not responding\n"
81
if {$slurm_conf_matches != 2} {
82
send_user "\nFAILURE: sacctmgr failed to show slurm_conf values\n"
85
if {$slurmdbd_conf_matches != 2} {
86
send_user "\nFAILURE: sacctmgr failed to show slurmdbd configuration\n"
90
if {$exit_code == 0} {
91
send_user "\nSUCCESS\n"