libcamera/test
Laurent Pinchart a5f12d2eb3 meson: utils: Provide environment for Python scripts
Python scripts run as part of the build process need to take a few
actions specific to the environment in which they operate. One of those
is disabling the Python bytecode cache, to avoid writing .pyc files to
the source tree. This is done manually in the IPC generate.py and
parser.py scripts.

The current implementation is not ideal because it hardcodes in the
scripts information related to the environment in which they operate. As
those scripts are part of libcamera this is more of a theoretical issue
than a practical one. A second issue is that future Python scripts will
need to duplicate similar mechanisms, resulting in a higher maintenance
burden.

Address the issue with a different approach, by creating a meson
environment for the Python scripts, and passing it to the
custom_target() functions. The environment only disables the bytecode
cache for now.

The diffstat shows an increase in code size. This is expected to be
offset by usage of the environment for more Python scripts, as well as
support of more variables in the environment.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-08-16 00:00:23 +03:00
..
camera test: camera: Increase timeout for vimc capture tests 2024-06-03 11:53:01 +03:00
controls libcamera: Drop remaining file name from header comment blocks 2024-05-09 23:31:15 +03:00
gstreamer gstreamer: allocator: Ensure camera manager stay alive 2024-07-25 11:44:32 +01:00
ipa libcamera: ipa_manager: Remove singleton requirement 2024-08-07 18:58:55 +03:00
ipc libcamera: Avoid variable-length arrays 2024-07-31 01:22:13 +03:00
libtest libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
log libcamera: Drop remaining file name from header comment blocks 2024-05-09 23:31:15 +03:00
media_device libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
process libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
py py: unittests.py: Fix type checker warnings 2023-06-04 16:10:51 +03:00
serialization meson: utils: Provide environment for Python scripts 2024-08-16 00:00:23 +03:00
stream libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
v4l2_compat libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
v4l2_subdevice libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
v4l2_videodevice test: v4l2_videodevice: Increase timeout for vimc capture tests 2024-06-03 11:53:10 +03:00
bayer-format.cpp libcamera: Drop remaining file name from header comment blocks 2024-05-09 23:31:15 +03:00
byte-stream-buffer.cpp libcamera: Drop remaining file name from header comment blocks 2024-05-09 23:31:15 +03:00
camera-sensor.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
color-space.cpp test: Add a ColorSpace test 2022-08-26 01:04:27 +03:00
delayed_controls.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
event-dispatcher.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
event-thread.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
event.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
fence.cpp test: fence: Increase timeout for fence test 2024-06-03 11:53:07 +03:00
file.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
flags.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
geometry.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
hotplug-cameras.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
mapped-buffer.cpp test: Remove using namespace in header files 2021-10-15 05:05:43 +03:00
meson.build test: Don't add current build directory to include path 2024-05-07 19:35:43 +03:00
message.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
object-delete.cpp libcamera: Drop remaining file name from header comment blocks 2024-05-09 23:31:15 +03:00
object-invoke.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
object.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
pixel-format.cpp libcamera/base: Move utils to the base library 2021-06-25 16:11:02 +01:00
public-api.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
shared-fd.cpp libcamera: Drop remaining file name from header comment blocks 2024-05-09 23:31:15 +03:00
signal-threads.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
signal.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
span.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
threads.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
timer-fail.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
timer-thread.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
timer.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
transform.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
unique-fd.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00
utils.cpp test: utils: Extend utils::hex() test to 8-bit and 16-bit values 2024-07-04 14:03:59 +03:00
yaml-parser.cpp libcamera: Drop file name from header comment blocks 2024-05-08 22:39:50 +03:00