aboutsummaryrefslogtreecommitdiff
path: root/src/main.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-13 17:47:01 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-13 17:47:01 +0200
commit55fab322485f67112c789a4a529765b5e6635238 (patch)
tree2bd5745278b06762c0fd5bd356f80edc3d96f003 /src/main.py
parent13fa2431ce628fbd8e64b18e40bb0eda2ae46058 (diff)
downloadminishell_test-55fab322485f67112c789a4a529765b5e6635238.tar.gz
minishell_test-55fab322485f67112c789a4a529765b5e6635238.tar.bz2
minishell_test-55fab322485f67112c789a4a529765b5e6635238.zip
Added C macro to detect when minishell is tested inside of code
Diffstat (limited to 'src/main.py')
-rwxr-xr-xsrc/main.py4
1 files changed, 3 insertions, 1 deletions
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)