This decorator sets environment variables, then runs the test, then restores them.
If the value is stored as __DONOTRESTORE__, the idea is that it should be deleted, otherwise it should be restored. But, before this patch it would set the value to __DONOTRESTORE__ if the value was __DONOTRESTORE__, and the key wasn't in os.environ. This fixes that. v4: - add this patch Signed-off-by: Dylan Baker <dylanx.c.ba...@intel.com> --- framework/tests/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/tests/utils.py b/framework/tests/utils.py index 0021681..438ffde 100644 --- a/framework/tests/utils.py +++ b/framework/tests/utils.py @@ -391,7 +391,7 @@ def set_env(**envargs): for key, value in backup.iteritems(): if value == "__DONOTRESTORE__" and key in os.environ: del os.environ[key] - else: + elif value != '__DONOTRESTORE__': os.environ[key] = value return _inner -- 2.4.5 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit