summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/utils
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:11:37 +0100
commitf4205dcf3d9127bdf5d2441e5f8e7b32cbe91903 (patch)
treeb2101e43d2227e05e6889d953782e87f15ff68ab /meta/lib/oeqa/core/utils
parentda6930c6f4652fd32062e8f2942a28353cd710f9 (diff)
downloadpoky-f4205dcf3d9127bdf5d2441e5f8e7b32cbe91903.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. (From OE-Core rev: 5a053b2a84e7a671925fb4a78005145786c57f6a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core/utils')
-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 @@
1#
2# Copyright (C) 2016 Intel Corporation
3#
4# SPDX-License-Identifier: MIT
5#
6
7def toList(obj, obj_type, obj_name="Object"):
8 if isinstance(obj, obj_type):
9 return [obj]
10 elif isinstance(obj, list):
11 return obj
12 else:
13 raise TypeError("%s must be %s or list" % (obj_name, obj_type))
14
15def toSet(obj, obj_type, obj_name="Object"):
16 if isinstance(obj, obj_type):
17 return {obj}
18 elif isinstance(obj, list):
19 return set(obj)
20 elif isinstance(obj, set):
21 return obj
22 else:
23 raise TypeError("%s must be %s or set" % (obj_name, obj_type))
24
25def strToList(obj, obj_name="Object"):
26 return toList(obj, str, obj_name)
27
28def strToSet(obj, obj_name="Object"):
29 return toSet(obj, str, obj_name)
30
31def intToList(obj, obj_name="Object"):
32 return toList(obj, int, obj_name)
33
34def dataStoteToDict(d, variables):
35 data = {}
36
37 for v in variables:
38 data[v] = d.getVar(v)
39
40 return data
41
42def updateTestData(d, td, variables):
43 """
44 Updates variables with values of data store to test data.
45 """
46 for var in variables:
47 td[var] = d.getVar(var)