Skip to content

Remove static variables from tests

Pekka Paalanen requested to merge pq/weston:mr/nostatic into master

Some tests use static variables to cache values for convenience. Sometimes the caching is completely useless in practice, and sometimes there is no reason to use a static variable to begin with. There are also some cases where the caching was useful.

The use of static variables breaks down when the test harness stops fork()ing each test case separately. To make !287 (merged) happen, static variables must be replaced.

Whether or not fork()ing in the test harness is removed, I think it is still good form to avoid using static data for things that are not truly tied to loading DSOs.

Merge request reports