diff options
| -rwxr-xr-x | minishell_test/__main__.py | 18 | ||||
| -rw-r--r-- | minishell_test/config.py | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/minishell_test/__main__.py b/minishell_test/__main__.py index fe48b5e..da7f173 100755 --- a/minishell_test/__main__.py +++ b/minishell_test/__main__.py @@ -42,15 +42,15 @@ def main(): sys.exit(1) if args.make: sys.exit(0) - if os.path.exists(config.EXECUTABLES_PATH): - shutil.rmtree(config.EXECUTABLES_PATH) - os.mkdir(config.EXECUTABLES_PATH) - for cmd in config.AVAILABLE_COMMANDS: - cmd_path = distutils.spawn.find_executable(cmd) - if cmd_path is None: - raise RuntimeError - shutil.copy(cmd_path, - os.path.join(config.EXECUTABLES_PATH, cmd)) + + if not os.path.exists(config.EXECUTABLES_PATH): + os.mkdir(config.EXECUTABLES_PATH) + for cmd in config.AVAILABLE_COMMANDS: + cmd_path = distutils.spawn.find_executable(cmd) + if cmd_path is None: + raise RuntimeError + shutil.copy(cmd_path, + os.path.join(config.EXECUTABLES_PATH, cmd)) reference_args = os.environ.get("MINISHELL_TEST_ARGS") if reference_args is not None: diff --git a/minishell_test/config.py b/minishell_test/config.py index 493652c..1497d0e 100644 --- a/minishell_test/config.py +++ b/minishell_test/config.py @@ -6,7 +6,7 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:19 by charles #+# #+# # -# Updated: 2021/01/31 04:41:29 by charles ### ########.fr # +# Updated: 2021/02/11 17:51:48 by charles ### ########.fr # # # # ############################################################################ # @@ -50,7 +50,7 @@ LOG_PATH = "result.log" SANDBOX_PATH = "sandbox" # where the availables commands are stored -EXECUTABLES_PATH = "./bin" +EXECUTABLES_PATH = "/tmp/minishell_test_bin" # commands available in test" AVAILABLE_COMMANDS = ["rmdir", "env", "cat", "touch", "ls", "grep", "sh", "head"] |
