+
+ cleanup_dir_name = None
+ if os.environ["INSTALLDIR"] in ["/", "/home/rift", "/home/rift/.install",
+ "/usr/rift/build/fc20_debug/install/usr/rift", "/usr/rift"]:
+ cleanup_dir_name = os.environ["INSTALLDIR"] + "/var/rift/"
+
+ if args.test_name and not cleanup_dir_name:
+ cleanup_dir_name = "find {rift_install}/var/rift -name '*{pattern}*' -type d".format( \
+ rift_install=os.environ['RIFT_INSTALL'],
+ pattern = args.test_name)
+ try:
+ cleanup_dir_name = subprocess.check_output(cleanup_dir_name, shell=True)
+ cleanup_dir_name = cleanup_dir_name[:-1].decode("utf-8") + "/"
+ except Exception as e:
+ print ("Directory not found exception occurred. Probably running for first time")
+ print ("Zookeper cleanup cmd = {}".format(cleanup_dir_name))
+ else:
+ if not cleanup_dir_name:
+ cleanup_dir_name = os.environ["INSTALLDIR"] + "/"
+