diff options
| -rwxr-xr-x | minishell_test/__main__.py | 5 | ||||
| -rw-r--r-- | minishell_test/args.py | 8 | ||||
| -rw-r--r-- | setup.cfg | 2 |
3 files changed, 13 insertions, 2 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. @@ -1,6 +1,6 @@ [metadata] name = minishell_test -version = 0.0.7 +version = 1.0.0 license = GPL2 license_file = LICENSE description = test for the minishell project of school 42 |
