summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/context.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/context.py b/meta/lib/oeqa/selftest/context.py
index 7589ca3c1f..494e9dbd1e 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -10,6 +10,7 @@ import glob
import sys
import importlib
import subprocess
+import unittest
from random import choice
import oeqa
@@ -60,9 +61,9 @@ class OESelftestTestContext(OETestContext):
os.chdir(newbuilddir)
- for t in suite:
+ def patch_test(t):
if not hasattr(t, "tc"):
- continue
+ return
cp = t.tc.config_paths
for p in cp:
if selftestdir in cp[p] and newselftestdir not in cp[p]:
@@ -70,6 +71,15 @@ class OESelftestTestContext(OETestContext):
if builddir in cp[p] and newbuilddir not in cp[p]:
cp[p] = cp[p].replace(builddir, newbuilddir)
+ def patch_suite(s):
+ for x in s:
+ if isinstance(x, unittest.TestSuite):
+ patch_suite(x)
+ else:
+ patch_test(x)
+
+ patch_suite(suite)
+
return (builddir, newbuilddir)
def prepareSuite(self, suites, processes):