add full-stack unit tests #165

Open
opened 2022-01-13 13:11:45 +08:00 by sb10q · 1 comment

Tests should compile specially-crafted bits of Python code that hit a maximum number of corner cases with NAC3, run the output with the LLVM JIT or bitcode interpreter, and check the results for correctness against the output of CPython running the same code.
We may invoke CPython or just hardcode the correct results manually, whatever is simpler.

Tests should compile specially-crafted bits of Python code that hit a maximum number of corner cases with NAC3, run the output with the LLVM JIT or bitcode interpreter, and check the results for correctness against the output of CPython running the same code. We may invoke CPython or just hardcode the correct results manually, whatever is simpler.
Poster
Owner

We can also load nac3artiq, compile in host mode, and load the result via ctypes.
Supporting asserts would be useful for writing tests: #89

NAC3 code calling into Python would be problematic as ctypes does not allow definining symbols to be used by the library (as usual things that have to do with dynamic linking on Linux kinda suck). A workaround would be a small C or Rust library that defines the symbols and then calls callbacks defined by Python.

We can also load nac3artiq, compile in host mode, and load the result via ctypes. Supporting asserts would be useful for writing tests: https://git.m-labs.hk/M-Labs/nac3/issues/89 NAC3 code calling into Python would be problematic as ctypes does not allow definining symbols to be used by the library (as usual things that have to do with dynamic linking on Linux kinda suck). A workaround would be a small C or Rust library that defines the symbols and then calls callbacks defined by Python.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#165
There is no content yet.