Skip to content
Commit fd583e77 authored by Douglas Raillard's avatar Douglas Raillard Committed by Douglas Raillard
Browse files

env.py: TestEnv: Allow sharing target attribute

When LISA_TARGET_SINGLETON env var is defined to 1, TestEnv will only
build the target once and will then reuse the same target in all
following TestEnv instances. This works around the fact that nosetest
does not allow passing arbitrary data down to test cases. TestEnv
instances have to horizontally cooperate instead to avoid this
reinitialization.

Move TestEnv._installed_tools, TestEnv._calib and TestEnv.nrg_model to a
storage dict attached to the target itself. That makes sure these values
will stick to their target while limiting to the absolute minimum the
number of TestEnv attributes directly shared. Having it as a dictionary
instead of inheriting from devlib.Target makes it easier to pinpoint
such shared data.

TestEnv.nrg_model is still exposed as a TestEnv attribute but is
initialized using that target storage dict.
parent 1cf30615
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment