summaryrefslogtreecommitdiffstats
path: root/dvm/3543/testcase
blob: 7eaf202cc3d6734050b5ac60eaec0b11995af5d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/python

import subprocess
import re
import sys
import os

def bug(gdir):
    cmd = gdir+'/gluster volume set help'
    cmd_obj= subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
    ret = cmd_obj.wait()
    if ret:
        return 1
    else:
        return 0

def main():
    gdir = os.environ['GLUSTERFSDIR']
    return_status = bug(gdir)
    if return_status:
        #print 'unsuccess'
        sys.exit(1)
    else:
        #print 'success'
        sys.exit(0)

if __name__ == '__main__':
    main()