diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 14:27:26 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 14:27:26 +0200 |
| commit | d0a80859f630866461e8a888b3f8fe008c8158ba (patch) | |
| tree | ad0ebcc42a620aeea5a4407e1cacbac24faf1dcb /src/main.py | |
| parent | 46ba2708f83bf46186c33bf84975d39e87f467c1 (diff) | |
| download | minishell_test-d0a80859f630866461e8a888b3f8fe008c8158ba.tar.gz minishell_test-d0a80859f630866461e8a888b3f8fe008c8158ba.tar.bz2 minishell_test-d0a80859f630866461e8a888b3f8fe008c8158ba.zip | |
Added suite group and suite bonus, Added signal (not tested)
Diffstat (limited to 'src/main.py')
| -rwxr-xr-x | src/main.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/main.py b/src/main.py index a71a485..3ad1ae4 100755 --- a/src/main.py +++ b/src/main.py @@ -19,29 +19,26 @@ import distutils.spawn import subprocess import config +import sandbox from args import parse_args from suite import Suite -import suites.builtin -import suites.cmd -import suites.preprocess -import suites.operation -import suites.parenthesis -import suites.status -import suites.path +from suites import * def main(): args = parse_args() if args.list: print("The available suites are:") print('\n'.join([" - " + s.name for s in Suite.available])) + print("Groups:") + print('\n'.join([" - " + ', '.join(s.groups) for s in Suite.available])) sys.exit(0) - if config.MINISHELL_BUILD or args.build: + if config.MINISHELL_MAKE or args.make: try: subprocess.run(["make", "-C", config.MINISHELL_DIR], check=True) except subprocess.CalledProcessError: sys.exit(1) - if args.build: + if args.make: sys.exit(0) if os.path.exists(config.EXECUTABLES_PATH): shutil.rmtree(config.EXECUTABLES_PATH) @@ -52,11 +49,15 @@ def main(): config.VERBOSE_LEVEL = args.verbose + if args.bonus: + config.BONUS = True + if args.no_bonus: + config.BONUS = False Suite.setup(args.suites) try: Suite.run_all() except KeyboardInterrupt: - shutil.rmtree(config.SANDBOX_PATH) + sandbox.remove() Suite.summarize() Suite.save_log() |
