~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to testsuite/expect/test21.25

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/expect
 
2
############################################################################
 
3
# Purpose: Test of SLURM functionality
 
4
#          sacctmgr show config
 
5
#
 
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.
 
14
 
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.
 
18
#  
 
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)
 
22
# any later version.
 
23
 
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
 
27
# details.
 
28
 
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
############################################################################
 
33
source ./globals
 
34
 
 
35
set test_id     "21.25"
 
36
set exit_code   0
 
37
 
 
38
print_header $test_id
 
39
 
 
40
#
 
41
# Use sacctmgr to create a cluster
 
42
#
 
43
set slurm_conf_matches    0
 
44
set slurmdbd_conf_matches 0
 
45
spawn $sacctmgr show config
 
46
expect {
 
47
        -re "You are not running a supported accounting_storage plugin" {
 
48
                set slurm_conf_matches    2
 
49
                set slurmdbd_conf_matches 2
 
50
                exp_continue
 
51
        }
 
52
        -re "AccountingStorageType *= *accounting_storage/slurmdbd" {
 
53
                incr slurm_conf_matches
 
54
                exp_continue
 
55
        }
 
56
        -re "AccountingStorageType" {
 
57
                incr slurm_conf_matches
 
58
                set slurmdbd_conf_matches 2
 
59
                exp_continue
 
60
        }
 
61
        -re "SLURM_CONF" {
 
62
                incr slurm_conf_matches
 
63
                exp_continue
 
64
        }
 
65
        -re "DbdHost" {
 
66
                incr slurmdbd_conf_matches
 
67
                exp_continue
 
68
        }
 
69
        -re "SLURMDBD_CONF" {
 
70
                incr slurmdbd_conf_matches
 
71
                exp_continue
 
72
        }
 
73
        timeout {
 
74
                send_user "\nFAILURE: sacctmgr add not responding\n"
 
75
                set exit_code 1
 
76
        }
 
77
        eof {
 
78
                wait
 
79
        }
 
80
}
 
81
if {$slurm_conf_matches != 2} {
 
82
        send_user "\nFAILURE:  sacctmgr failed to show slurm_conf values\n"
 
83
        set exit_code 1
 
84
}
 
85
if {$slurmdbd_conf_matches != 2} {
 
86
        send_user "\nFAILURE:  sacctmgr failed to show slurmdbd configuration\n"
 
87
        set exit_code 1
 
88
}
 
89
 
 
90
if {$exit_code == 0} {
 
91
        send_user "\nSUCCESS\n"
 
92
}
 
93
 
 
94
exit $exit_code