Skip to content

Add integration tests for the C backend #544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 4 tasks
Tracked by #545
certik opened this issue Jun 1, 2022 · 4 comments
Closed
2 of 4 tasks
Tracked by #545

Add integration tests for the C backend #544

certik opened this issue Jun 1, 2022 · 4 comments

Comments

@certik
Copy link
Contributor

certik commented Jun 1, 2022

Currently we only test the --show-c with the ./run_tests.py testsuite, which checks the generated C output. We also have to add integration tests that will test:

  • actually compiling the C code via a C compiler
  • linking multiple files
  • testing the C interop (call into C, callback from C, etc.)
  • testing importing C header files (Import from C Header File #541)

We probably can extend our current test framework, to test llvm and/or C with the same test files. We have to add the ability to specify other C files to compile and link.

I think the frontend should be improved to be able to use syntax like:

lpython --backend=c -c some_file.py -o some_file.c

Then we compile everything with gcc or clang.

@certik
Copy link
Contributor Author

certik commented Jun 1, 2022

See also #542.

@Smit-create
Copy link
Collaborator

This seems to be fixed now.

@certik
Copy link
Contributor Author

certik commented Jun 11, 2022

Only the first bullet point is fixed, the other three we still have to fix.

@certik
Copy link
Contributor Author

certik commented Jun 13, 2022

The ./run_tests.sh script now tests everything, and I moved the remaining two tasks above to #545, so I am going to close this one.

@certik certik closed this as completed Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants