Skip to content

Commit

Permalink
flock-test: make two nodes to do the test
Browse files Browse the repository at this point in the history
Flock test needs two nodes, get the first two nodes from nodes list
to do the test.

Signed-off-by: Junxiao Bi <[email protected]>
Reviewed-by: Eric Ren <[email protected]>
  • Loading branch information
biger410 authored and Eric Ren committed Sep 23, 2015
1 parent ca4faae commit 168b7ac
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions programs/flock_tests/run_flock_unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
lhostname = str(socket.gethostname())
logfile = config.LOGFILE
interface = 'eth0'
procs = 1
procs = 2
cmd = config.BINDIR+'/flock_unit_test'
#
Usage = """
Expand Down Expand Up @@ -126,13 +126,12 @@
logfile = options.logfile

if options.nodelist:
nodelist = options.nodelist.split(',')
nodelen = len(nodelist)
procs = nodelen
tmplist = options.nodelist.split(',')
nodelen = len(tmplist)
if nodelen == 1:
nodelist = nodelist.append(options.nodelist)
options.nodelist = tmplist[0] + "," + tmplist[0]
else:
nodelist = options.nodelist.split(',')
options.nodelist = tmplist[0] + "," + tmplist[1]
else:
if not options.cleanup:
parser.error('Invalid node list.')
Expand Down

0 comments on commit 168b7ac

Please sign in to comment.