From 55fab322485f67112c789a4a529765b5e6635238 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 13 Sep 2020 17:47:01 +0200 Subject: Added C macro to detect when minishell is tested inside of code --- src/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.py') diff --git a/src/main.py b/src/main.py index 4ba5128..8efb43c 100755 --- a/src/main.py +++ b/src/main.py @@ -37,7 +37,9 @@ def main(): if config.MINISHELL_MAKE or args.make: try: print("========================================MAKE====================================") - subprocess.run(["make", "-C", config.MINISHELL_DIR], check=True) + subprocess.run(["make", "-C", config.MINISHELL_DIR], + check=True, + env={"MINISHELL_TEST_FLAGS": "-DMINISHELL_TEST", **os.environ}) print("================================================================================") except subprocess.CalledProcessError: sys.exit(1) -- cgit