Skip to content

Commit

Permalink
Merge pull request #64 from tsbxmw/dev-2.2.0
Browse files Browse the repository at this point in the history
support dir
  • Loading branch information
tsbxmw authored Jan 2, 2019
2 parents 2afebfa + 90a7ba6 commit 29c2efc
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions haf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@ def main_args():
args.bus_server = [bytes(password, encoding='utf-8'), host, int(port)]
if args.web_server:
pass

cases = []
for case in args.case:
cases.append(case)
args.case = []
for path in cases:
if not path.endswith(".py") and not path.endswith(".yml") and not path.endswith(".json") and not path.endswith(".xlsx"):
if os.path.exists(path) and os.path.isdir(path):
file_list = os.listdir(path)
for f in file_list:
if f.startswith("test_") and (f.endswith(".py") or f.endswith(".yml") or f.endswith(".json") or f.endswith(".xlsx")):
args.case.append(os.path.join(path, f))
else:
print("found wrong case path ...")
else:
args.case.append(path)

print(args)
main_program.run(args)
else:
Expand Down

0 comments on commit 29c2efc

Please sign in to comment.