From cca2c345f9b16b88e1fc4e9ea598cf2f7ed8653a Mon Sep 17 00:00:00 2001 From: Carlos Maniero Date: Mon, 24 Apr 2023 22:33:52 -0300 Subject: cli: Create a CLI to generate an executable from pipa code. This commit introduces a full-featured CLI that allows you to compile a file, set the gas and linker path, and define the executable output. Signed-off-by: Carlos Maniero Reviewed-by: Johnny Richard Link: https://lists.sr.ht/~johnnyrichard/pipalang-devel/patches/40642 --- test/integration_test.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'test/integration_test.c') diff --git a/test/integration_test.c b/test/integration_test.c index 0ef3f5d..b6c0f36 100644 --- a/test/integration_test.c +++ b/test/integration_test.c @@ -22,15 +22,12 @@ void assert_exit_status(char* filename, int expected_exit_status) { - char command[255] = "../pipac "; + char command[255] = "../pipa --silent --out /tmp/pipa_program "; strcat(command, filename); - strcat(command, " > /tmp/pipa_example.s"); system(command); - system("as -o /tmp/pipa_example.o /tmp/pipa_example.s --64"); - system("ld -o /tmp/pipa_example /tmp/pipa_example.o"); - int status = system("/tmp/pipa_example"); + int status = system("/tmp/pipa_program"); if (WIFEXITED(status)) { int exit_status = WEXITSTATUS(status); -- cgit v1.2.3