Open epage opened 1 year ago
I saw this discussed somewhere else and wish I could find it at the moment.
The challenges with this approach is that it increases the API surface area (have to stabilize all types used in the interface). This might not seem so bad for libtest today but that would be prohibitive for the goal of a pytest-like custom test harness.
I suspect the best route forward would be for this to be developed as two separate custom test harnesses (one for the host-side binary, one for the dylib binary). This would unblock people while being able to experiment with what such an API could look like.
My best guess is we'd need something like my original plan for libtest (define extension points that allow a pytest-like harness). For this specific case, the dylib API would not expose test functions but "test generation" functions. This would allow a lot more complex operations, like what a pytest-like API would need, to exist within the test generator.
A benefit to this is we could do process isolation for test generators. This would help with catching certain classes of bugs and capturing stdout/stderr. A simple test harness could perfectly do this on a per-test basis while a more complex one would still at least get some benefit.
I suspect the first step to vet test generators to stabilize a dylib API around them would be to keep with the plan as-is.
@_Charles Lew|116458 said: