mirror of
https://github.com/cottongin/cardputerzero-camera.git
synced 2026-11-20 14:24:48 -06:00
fix(app): propagate CZ_TARGET_DEVICE to czcamera_core and keep reap_mutex_ across child_pid_ clear
This commit is contained in:
@@ -259,6 +259,17 @@ void test_sim_backend_lifecycle() {
|
||||
assert(from_env != nullptr);
|
||||
assert(from_env->status().backend_name == "sim");
|
||||
}
|
||||
{
|
||||
EnvVarGuard clear_backend("CZCAMERA_BACKEND");
|
||||
EnvVarGuard clear_bin("CZCAMERA_CAM_BIN");
|
||||
auto default_backend = cz::create_camera_backend(false);
|
||||
assert(default_backend != nullptr);
|
||||
#ifdef CZ_TARGET_DEVICE
|
||||
assert(default_backend->status().backend_name == "picamera2-subprocess");
|
||||
#else
|
||||
assert(default_backend->status().backend_name == "sim");
|
||||
#endif
|
||||
}
|
||||
|
||||
cz::SimCameraBackend sim;
|
||||
assert(!sim.status().ready);
|
||||
|
||||
Reference in New Issue
Block a user