def test_cdp_keyvals_to_csv(self): """test CrosDataParser.keyvals_to_csv with name="*keyval*" """ with CrosDataParser() as cdp: try: keyvals = cdp.ls_local("./unittest", "*keyval*") cdp.keyvals_to_csv(keyvals) except: self.fail("exception is raised!")
def test_cdp_keyvals_summary(self): """test CrosDataParser.keyvals_summary """ with CrosDataParser() as cdp: try: keyval_paths = cdp.ls_local("./unittest", "*keyval*") cdp.keyvals_summary(keyval_paths, "./unittest/keyval_summary.csv") except: self.fail("exception is raised!")
def test_cdp_ls_local_5(self): """test CrosDataParser.ls_local with name="keyval" """ expected = [] result = [] with CrosDataParser() as cdp: result = cdp.ls_local("./unittest", "keyval") self.assertCountEqual( result, expected ) # compare two lists having the same elements but in a different order
cdl.agt_log(args.duration, args.index, args.input, args.output) elif args.job == "agt-internal-log": with CrosDataLogger(args.ip, args.username, args.keyfile, args.debug) as cdl: cdl.agt_internal_log(args.duration, args.index, args.input, args.output) elif args.job == "pac-log": with CrosDataLogger(args.ip, args.username, args.keyfile, args.debug) as cdl: cdl.pac_log(args.duration, args.password) # cros data parser jobs elif args.job == "ls-local": with CrosDataParser() as cdp: cdp.ls_local(args.directory, args.input) elif args.job == "keyvals-to-csv": with CrosDataParser() as cdp: keyval_paths = cdp.ls_local(args.directory, "*keyval*") cdp.keyvals_to_csv(keyval_paths) elif args.job == "keyvals-summary": with CrosDataParser() as cdp: keyval_paths = cdp.ls_local(args.directory, "*keyval*") cdp.keyvals_summary(keyval_paths, args.output) elif args.job == "results-charts-summary": with CrosDataParser() as cdp: results_chart_paths = cdp.ls_local(args.directory,