diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-05 20:15:08 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-05 20:28:08 +0100 |
| commit | a142666db6352aae81c921cfc5cb81f091355e32 (patch) | |
| tree | b9d9d08bf29aff4dc581cf558c86c023293b902c /minishell_test | |
| parent | 9d59bbdfb37869eec15551c03c167a2036f2d168 (diff) | |
| download | minishell_test-a142666db6352aae81c921cfc5cb81f091355e32.tar.gz minishell_test-a142666db6352aae81c921cfc5cb81f091355e32.tar.bz2 minishell_test-a142666db6352aae81c921cfc5cb81f091355e32.zip | |
Added option to change path to minishell directory (#12)
Diffstat (limited to 'minishell_test')
| -rwxr-xr-x | minishell_test/__main__.py | 5 | ||||
| -rw-r--r-- | minishell_test/args.py | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/minishell_test/__main__.py b/minishell_test/__main__.py index 1728029..a90c817 100755 --- a/minishell_test/__main__.py +++ b/minishell_test/__main__.py @@ -31,6 +31,11 @@ def main(argv=None): Suite.list() sys.exit(0) + config.MINISHELL_DIR = args.path + config.MINISHELL_PATH = os.path.abspath( + os.path.join(config.MINISHELL_DIR, config.MINISHELL_EXEC) + ) + if config.MINISHELL_MAKE or args.make: try: print("{:=^{width}}".format("MAKE", width=config.TERM_COLS)) diff --git a/minishell_test/args.py b/minishell_test/args.py index fb12841..d5f565f 100644 --- a/minishell_test/args.py +++ b/minishell_test/args.py @@ -6,13 +6,15 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:32 by charles #+# #+# # -# Updated: 2021/02/05 17:14:41 by charles ### ########.fr # +# Updated: 2021/02/05 20:12:53 by charles ### ########.fr # # # # ############################################################################ # import argparse import textwrap +import minishell_test.config as config + def parse_args(): """Parse command line arguments""" @@ -67,6 +69,10 @@ def parse_args(): help="After running the test, display the result in a pager of your choice" ) parser.add_argument( + "-p", "--path", default=config.MINISHELL_DIR, + help="Path to minishell directory" + ) + parser.add_argument( "suites", nargs='*', metavar="suite", help=textwrap.dedent("""\ Test suites/group to run. |
