From 8cd97799880032fee3b55e473a8c718479420ba7 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 10 Sep 2020 11:45:31 +0200 Subject: explore-kconfig --neighbourhood: add directory support --- bin/explore-kconfig.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/explore-kconfig.py b/bin/explore-kconfig.py index 596faff..8887ef1 100755 --- a/bin/explore-kconfig.py +++ b/bin/explore-kconfig.py @@ -64,14 +64,17 @@ def main(): if args.random: for i in range(args.random): - logging.info(f"Running experiment {i+1} of {args.random}") + logging.info(f"Running randconfig {i+1} of {args.random}") kconf.run_randconfig() if args.neighbourhood: if os.path.isfile(args.neighbourhood): kconf.run_exploration_from_file(args.neighbourhood) elif os.path.isdir(args.neighbourhood): - pass + for filename in os.listdir(args.neighbourhood): + config_filename = f"{args.neighbourhood}/{filename}" + logging.info(f"Exploring neighbourhood of {config_filename}") + kconf.run_exploration_from_file(config_filename) else: print( f"--neighbourhod: Error: {args.neighbourhood} must be a file or directory, but is neither", -- cgit v1.2.3