in fiosynth_lib/fiosynth.py [0:0]
def runSuite(args):
dut_list = getServers(args.servers, args.server_file, args.user)
# Use absolute path for workload suite files
wklds = os.path.join(FioDUT.wkldsuites, args.wklds)
profile = fio_json_parser.read_json(wklds)
# dst_file = '/usr/local/fb-FioSynthFlash/offset.txt'
dst_file = "/tmp/offset.txt"
loadDevList(dut_list, args, profile)
prepServers(dut_list, args, profile)
timestamp = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M")
if args.deterministic:
FioDUT.fname = args.fname
else:
FioDUT.fname = "-".join([args.fname, timestamp])
FioDUT.csvfname = "-".join([FioDUT.fname, "compiled_results"])
csvFolderPath = os.path.join(os.getcwd(), FioDUT.csvfname)
print("Results are in directory: %s" % FioDUT.fname)
if not os.path.isdir(FioDUT.fname):
os.mkdir(FioDUT.fname)
if args.cycles == -1:
rc = profile["run_cycles"]
else:
rc = args.cycles
if "precondition_first_cycle_only" not in profile:
profile["precondition_first_cycle_only"] = None
if profile["precondition_first_cycle_only"] == "Y":
lp = 1
else:
lp = 1000
if args.prep == "n":
pc = 0
if dut_list[0].inLocalMode():
for dut in dut_list:
dut.offset = readOffsetFile(dut, dst_file)
elif args.prep == "o":
lp = 1 # The number of loops that will be prepared
pc = profile["precondition_cycles"]
for dut in dut_list:
createOffsetFile(dut, dst_file)
else:
pc = profile["precondition_cycles"]
for dut in dut_list:
createOffsetFile(dut, dst_file)
runCycles(dut_list, profile, args, rc, pc, lp, csvFolderPath)
if dut_list[0].inLocalMode():
runHealthMon(dut_list[0].fname, args.health, args.getflash)
if args.dryrun == "n":
if not dut_list[0].inLocalMode():
fio_json_parser.combineCsv(csvFolderPath, FioDUT.fname, dut_list)
print("Your results are in: %s" % csvFolderPath)