summaryrefslogtreecommitdiff
path: root/test/integration_test.c
diff options
context:
space:
mode:
authorCarlos Maniero <carlosmaniero@gmail.com>2023-04-24 22:33:52 -0300
committerJohnny Richard <johnny@johnnyrichard.com>2023-04-25 09:11:12 +0200
commitcca2c345f9b16b88e1fc4e9ea598cf2f7ed8653a (patch)
treeca827f22e754a38558d57a76fdefca5a2a8f6208 /test/integration_test.c
parent6df9e8bf9433cb095090dab0474367b220585a47 (diff)
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 <carlosmaniero@gmail.com> Reviewed-by: Johnny Richard <johnny@johnnyrichard.com> Link: https://lists.sr.ht/~johnnyrichard/pipalang-devel/patches/40642
Diffstat (limited to 'test/integration_test.c')
-rw-r--r--test/integration_test.c7
1 files changed, 2 insertions, 5 deletions
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);