summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-31 19:29:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-01 23:05:31 +0100
commit5a053b2a84e7a671925fb4a78005145786c57f6a (patch)
treecc289c3fc1f51228d421d758b09fedecfcec021a
parent2dfe2f68307a441fff2f5018408558bca63f7d03 (diff)
downloadopenembedded-core-contrib-5a053b2a84e7a671925fb4a78005145786c57f6a.tar.gz
oeqa/core/utils/misc: remove redundant file
This file dates back to 2016. Half of the functions have never been used, the rest are used in one place and have now been replaced. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--meta/lib/oeqa/core/utils/misc.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
deleted file mode 100644
index e1a59588eb..0000000000
--- a/meta/lib/oeqa/core/utils/misc.py
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Copyright (C) 2016 Intel Corporation
-#
-# SPDX-License-Identifier: MIT
-#
-
-def toList(obj, obj_type, obj_name="Object"):
- if isinstance(obj, obj_type):
- return [obj]
- elif isinstance(obj, list):
- return obj
- else:
- raise TypeError("%s must be %s or list" % (obj_name, obj_type))
-
-def toSet(obj, obj_type, obj_name="Object"):
- if isinstance(obj, obj_type):
- return {obj}
- elif isinstance(obj, list):
- return set(obj)
- elif isinstance(obj, set):
- return obj
- else:
- raise TypeError("%s must be %s or set" % (obj_name, obj_type))
-
-def strToList(obj, obj_name="Object"):
- return toList(obj, str, obj_name)
-
-def strToSet(obj, obj_name="Object"):
- return toSet(obj, str, obj_name)
-
-def intToList(obj, obj_name="Object"):
- return toList(obj, int, obj_name)
-
-def dataStoteToDict(d, variables):
- data = {}
-
- for v in variables:
- data[v] = d.getVar(v)
-
- return data
-
-def updateTestData(d, td, variables):
- """
- Updates variables with values of data store to test data.
- """
- for var in variables:
- td[var] = d.getVar(var)