summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2018-07-20 01:39:05 +0300
committerAndres Gomez <agomez@igalia.com>2018-07-20 10:22:35 +0300
commitf363ec73caf54d7c4daf7a03bc1066e7f79a8fe3 (patch)
tree85d48ba2f3461abe3c77c0bef2e87c5fa30b9eca /framework
parentebf56c15d788330b37633532a76aa8ac0d142d07 (diff)
framework: deepcopy TestProfile's filters when copying it
This avoids modifications in the original filters object. Detected through Travis CI. Fixed also a couple of typos. Fixes: 1f0f2ad25 ("framework: Add filters class") Cc: Dylan Baker <dylanx.c.baker@intel.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/profile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/profile.py b/framework/profile.py
index a6cac2cf0..8d6fd0706 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -501,11 +501,14 @@ class TestProfile(object):
This method creates a copy with references to the original instance
using copy.copy. This allows profiles to be "subclassed" by other
profiles, without modifying the original.
+
+ copy.deepcopy is used for the filters so the original is
+ actually not modified in this case.
"""
new = copy.copy(self)
new.test_list = copy.copy(self.test_list)
new.forced_test_list = copy.copy(self.forced_test_list)
- new.filters = copy.copy(self.filters)
+ new.filters = copy.deepcopy(self.filters)
return new
def itertests(self):