Skip to content

Add integration tests for the C backend #544

Closed

Description

@certik

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.

Activity

  1. certik commented on Jun 1, 2022

    @certik
    ContributorAuthor

    See also #542.

  2. Smit-create commented on Jun 11, 2022

    @Smit-create
    Collaborator

    This seems to be fixed now.

  3. certik commented on Jun 11, 2022

    @certik
    ContributorAuthor

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

  4. certik commented on Jun 13, 2022

    @certik
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions