summaryrefslogtreecommitdiff
path: root/tools/compileconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/compileconfig.py')
-rwxr-xr-xtools/compileconfig.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py
index 777a12f..d9ac740 100755
--- a/tools/compileconfig.py
+++ b/tools/compileconfig.py
@@ -350,19 +350,19 @@ def gen_config(nodename, config, localconfig):
def gen_testmakefile(config, testmakefile, machines):
configfile = open(testmakefile, "w")
- frontendnodenames = [node["name"] for node in config["frontendnodes"]]
- storagenodenames = [node["name"] for node in config["storagenodes"]]
- signingnodenames = [node["name"] for node in config["signingnodes"]]
- mergenodenames = [node["name"] for node in config["mergenodes"]]
- erlangnodenames = frontendnodenames + storagenodenames + signingnodenames + \
- filter(lambda name: name != config["primarymergenode"], mergenodenames)
+ frontendnodenames = set([node["name"] for node in config["frontendnodes"]])
+ storagenodenames = set([node["name"] for node in config["storagenodes"]])
+ signingnodenames = set([node["name"] for node in config["signingnodes"]])
+ mergenodenames = set([node["name"] for node in config["mergenodes"]])
+ erlangnodenames = frontendnodenames | storagenodenames | signingnodenames | \
+ set(filter(lambda name: name != config["primarymergenode"], mergenodenames))
frontendnodeaddresses = [node["publicaddress"] for node in config["frontendnodes"]]
storagenodeaddresses = [node["address"] for node in config["storagenodes"]]
signingnodeaddresses = [node["address"] for node in config["signingnodes"]]
mergenodeaddresses = [node["address"] for node in config["mergenodes"] if node["name"] != config["primarymergenode"]]
- print >>configfile, "NODES=" + " ".join(frontendnodenames+storagenodenames+signingnodenames+mergenodenames)
+ print >>configfile, "NODES=" + " ".join(frontendnodenames|storagenodenames|signingnodenames|mergenodenames)
print >>configfile, "ERLANGNODES=" + " ".join(erlangnodenames)
print >>configfile, "MACHINES=" + " ".join([str(e) for e in range(1, machines+1)])
print >>configfile, "TESTURLS=" + " ".join(frontendnodeaddresses+storagenodeaddresses+signingnodeaddresses+mergenodeaddresses)