Home
last modified time | relevance | path

Searched +full:self +full:- +full:test (Results 1 – 25 of 1010) sorted by relevance

12345678910>>...41

/openbmc/openbmc/poky/bitbake/lib/bb/tests/
H A Ddata.py7 # SPDX-License-Identifier: GPL-2.0-only
18 def __enter__(self): argument
21 def emit(self, record): argument
25 self.handler = handler
28 def __exit__(self, type, value, traceback): argument
30 logger.removeHandler(self.handler)
41 def setUp(self): argument
42 self.d = bb.data.init()
43 self.d["foo"] = "value_of_foo"
44 self.d["bar"] = "value_of_bar"
[all …]
H A Devent.py6 # SPDX-License-Identifier: GPL-2.0-only
27 def __init__(self): argument
28 self.event_calls = []
31 def _store_event_data_string(self, event): argument
34 self.event_calls.append(formatter.format(event))
36 self.event_calls.append(bb.event.getName(event))
42 def __init__(self): argument
43 super(EventQueueStub, self).__init__()
45 def send(self, event): argument
46 super(EventQueueStub, self)._store_event_data_string(event)
[all …]
/openbmc/u-boot/tools/binman/
H A Dftest.py1 # SPDX-License-Identifier: GPL-2.0+
5 # To run a single test, change to this directory, and:
7 # python -m unittest func_test.TestFunctional.testHelp
31 # Contents of test files, corresponding to different entry types
70 that it looks correct. The sample files are in the test/ subdirectory
73 For each entry type a very small test file is created using fixed
74 string contents. This makes it easy to test that things look right, and
77 In some cases a 'real' file must be used - these are also supplied in
78 the test/ diurectory.
81 def setUpClass(self): argument
[all …]
H A Delf_test.py1 # SPDX-License-Identifier: GPL-2.0+
5 # Test for the elf module
23 def __init__(self, contents_size): argument
24 self.contents_size = contents_size
25 self.data = 'a' * contents_size
27 def GetPath(self): argument
38 def __init__(self, sym_value=1): argument
39 self.sym_value = sym_value
41 def GetPath(self): argument
44 def LookupSymbol(self, name, weak, msg): argument
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/core/decorator/
H A Ddata.py4 # SPDX-License-Identifier: MIT
33 Skip test based on value of a data store's variable.
36 check it against value; if are equal it will skip the test
42 def setUpDecorator(self): argument
43 msg = ('Checking if %r value is %r to skip test' %
44 (self.var, self.value))
45 self.logger.debug(msg)
46 if self.case.td.get(self.var) == self.value:
47 self.case.skipTest(self.msg)
52 Skip test based on value of a data store's variable.
[all …]
/openbmc/openbmc/meta-arm/meta-arm/lib/oeqa/runtime/cases/
H A Dtrusted_services.py10 def run_test_tool(self, cmd, expected_status=0, expected_output=None ): argument
11 """ Run a test utility """
13 status, output = self.target.run(cmd)
14 self.assertEqual(status, expected_status, msg='\n'.join([cmd, output]))
16 self.assertEqual(output, expected_output, msg='\n'.join([cmd, output]))
18 @OEHasPackage(['ts-demo'])
20 def test_00_ts_demo(self): argument
21 self.run_test_tool('ts-demo')
23 @OEHasPackage(['ts-uefi-test'])
25 def test_02_ts_uefi_test(self): argument
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/core/
H A Drunner.py4 # SPDX-License-Identifier: MIT
19 def __init__(self, logger): argument
20 self.logger = logger
21 self.buffer = ""
23 def write(self, msg): argument
26 self.buffer += msg
27 elif self.buffer:
28 self.buffer += msg
29 self.logger.log(logging.INFO, self.buffer)
30 self.buffer = ""
[all …]
/openbmc/linux/tools/testing/kunit/
H A Dkunit_parser.py1 # SPDX-License-Identifier: GPL-2.0
3 # Parses KTAP test results from a kernel dmesg log and incrementally prints
4 # results with reader-friendly format. Stores and returns test results in a
5 # Test object.
22 class Test: class
24 A class to represent a test parsed from KTAP results. All KTAP
25 results within a test log are stored in a main Test object as
29 status : TestStatus - status of the test
30 name : str - name of the test
31 expected_count : int - expected number of subtests (0 if single
[all …]
/openbmc/linux/tools/perf/tests/
H A Dattr.py1 # SPDX-License-Identifier: GPL-2.0
36 def __init__(self, test, msg): argument
37 self.msg = msg
38 self.test = test
39 def getMsg(self): argument
40 return '\'%s\' - %s' % (self.test.path, self.msg)
43 def __init__(self, test, arch): argument
44 self.arch = arch
45 self.test = test
46 def getMsg(self): argument
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/runtime/cases/
H A Ddnf.py4 # SPDX-License-Identifier: MIT
19 def dnf(self, command, expected = 0): argument
21 status, output = self.target.run(command, 1500)
23 self.assertEqual(status, expected, message)
28 @skipIfNotFeature('package-management',
29 'Test requires package-management to be in IMAGE_FEATURES')
34 def test_dnf_help(self): argument
35 self.dnf('--help')
38 def test_dnf_version(self): argument
39 self.dnf('--version')
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/buildperf/
H A Dbase.py3 # SPDX-License-Identifier: GPL-2.0-only
5 """Build performance test base classes and functionality"""
28 log = logging.getLogger('build-perf')
44 cmd = ['sudo', '-k', '-n', 'tee', '/proc/sys/vm/drop_caches']
56 cmd = ['sudo', '-k']
58 cmd.append('-S')
61 cmd.append('-n')
70 return re.sub(r'(\W+)', '-', string, flags=re.LOCALE)
74 """Extended encoder for build perf test results"""
77 def default(self, obj): argument
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/selftest/cases/
H A Dbblogging.py4 # SPDX-License-Identifier: MIT
13 def assertCount(self, item, entry, count): argument
14self.assertEqual(item.count(entry), count, msg="Output:\n'''\n%s\n'''\ndoesn't contain %d copies o…
16 def test_shell_loggingA(self): argument
18 self.write_config('BBINCLUDELOGS = ""')
19 result = bitbake("logging-test -c shelltest -f", ignore_status = True)
20 self.assertIn("ERROR: Logfile of failure stored in:", result.output)
21 self.assertNotIn("This is shell stdout", result.output)
22 self.assertNotIn("This is shell stderr", result.output)
24 def test_shell_loggingB(self): argument
[all …]
H A Dsysroot.py4 # SPDX-License-Identifier: MIT
13 def test_sysroot_cleanup(self): argument
15 Build sysroot test which depends on virtual/sysroot-test for one machine,
16 switch machine, switch provider of virtual/sysroot-test and check that the
19 Yes, sysroot-test should be machine specific really to avoid this, however
26 self.write_config("""
27 PREFERRED_PROVIDER_virtual/sysroot-test = "sysroot-test-arch1"
29 TESTSTRING:pn-sysroot-test-arch1 = "%s"
30 TESTSTRING:pn-sysroot-test-arch2 = "%s"
32 bitbake("sysroot-test")
[all …]
H A Dwic.py4 # SPDX-License-Identifier: GPL-2.0-only
9 """Test cases for wic."""
30 extract file names from the output of debugfs -R 'ls -p',
54 """Wic test class."""
59 def setUpLocal(self): argument
60 """This code is executed before each test method."""
61 self.resultdir = os.path.join(self.builddir, "wic-tmp")
62 super(WicTestCase, self).setUpLocal()
68 if self.td['USE_NLS'] != 'yes':
69 self.skipTest('wic-tools needs USE_NLS=yes')
[all …]
/openbmc/qemu/tests/qemu-iotests/
H A Dtestrunner.py3 # Copyright (c) 2020-2021 Virtuozzo International GmbH
39 def silent_unlink(path: Path) -> None:
46 def file_diff(file1: str, file2: str) -> List[str]:
47 with open(file1, encoding="utf-8") as f1, \
48 open(file2, encoding="utf-8") as f2:
61 """ Cache for elapsed time for tests, to show it during new test run
64 use it inside with-block or use save() after update().
66 def __init__(self, cache_file: str, env: TestEnv) -> None: argument
67 self.env = env
68 self.cache_file = cache_file
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/core/utils/
H A Dconcurrencytest.py5 # SPDX-License-Identifier: GPL-2.0-or-later
14 # Copyright (C) 2005-2011 Canonical Ltd
53 … def __init__(self, target, semaphore, threadnum, totalinprocess, totaltests, output, finalresult): argument
54 super(BBThreadsafeForwardingResult, self).__init__(target, semaphore)
55 self.threadnum = threadnum
56 self.totalinprocess = totalinprocess
57 self.totaltests = totaltests
58 self.buffer = True
59 self.outputbuf = output
60 self.finalresult = finalresult
[all …]
/openbmc/u-boot/tools/binman/etype/
H A D_testing.py1 # SPDX-License-Identifier: GPL-2.0+
5 # Entry-type module for testing purposes. Not used in real images.
22 test-str-fdt: Test string, normally in the node
23 test-int-fdt: Test integer, normally in the node
24 test-str-arg: Test string, normally in the entry arguments
25 test-int-arg: Test integer, normally in the entry arguments
31 return-invalid-entry: Return an invalid entry from GetOffsets()
32 return-unknown-contents: Refuse to provide any contents (to cause a
34 bad-update-contents: Implement ProcessContents() incorrectly so as to
36 never-complete-process-fdt: Refund to process the FDT (to cause a
[all …]
/openbmc/qemu/tests/avocado/avocado_qemu/
H A D__init__.py1 # Test class and utilities for functional tests
9 # later. See the COPYING file in the top-level directory.
39 @skipUnless(*has_cmd('sudo -n', ('sudo', '-n', 'true')))
40 def test_something_that_needs_sudo(self):
50 exitcode = -1
65 @skipUnless(*has_cmds(('cmd1', ('cmd1', '--some-parameter')),
67 def test_something_that_needs_cmd1_and_cmd2(self):
95 def pick_default_qemu_bin(bin_prefix='qemu-system-', arch=None):
126 def _console_interaction(test, success_message, failure_message, argument
130 vm = test.vm
[all …]
/openbmc/u-boot/tools/dtoc/
H A Dtest_fdt2 # SPDX-License-Identifier: GPL-2.0+
28 """Low-level function to get the property value based on its offset
65 def setUp(self): argument
66 self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
68 def testFdt(self): argument
69 """Test that we can open an Fdt"""
70 self.dtb.Scan()
71 root = self.dtb.GetRoot()
72 self.assertTrue(isinstance(root, fdt.Node))
74 def testGetNode(self): argument
[all …]
H A Dtest_fdt.py2 # SPDX-License-Identifier: GPL-2.0+
28 """Low-level function to get the property value based on its offset
65 def setUp(self): argument
66 self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
68 def testFdt(self): argument
69 """Test that we can open an Fdt"""
70 self.dtb.Scan()
71 root = self.dtb.GetRoot()
72 self.assertTrue(isinstance(root, fdt.Node))
74 def testGetNode(self): argument
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/sdk/cases/
H A Dgcc.py4 # SPDX-License-Identifier: MIT
21 def setUpClass(self): argument
22 files = {'test.c' : self.tc.files_dir, 'test.cpp' : self.tc.files_dir,
23 'testsdkmakefile' : self.tc.sdk_files_dir}
26 os.path.join(self.tc.sdk_dir, f))
28 def setUp(self): argument
29 libc = self.td.get("TCLIBC")
33 machine = self.td.get("MACHINE")
34 if not (self.tc.hasHostPackage("packagegroup-cross-canadian-%s" % machine) or
35 self.tc.hasHostPackage("^gcc-", regex=True)):
[all …]
/openbmc/openbmc/poky/meta/lib/oeqa/
H A Doetest.py4 # SPDX-License-Identifier: MIT
26 # Exported test doesn't require sdkext
38 def __getitem__(self, key): argument
63 def hasPackage(self, pkg): argument
70 def hasPackageMatch(self, match): argument
81 def hasFeature(self,feature): argument
89 def __init__(self, methodName='runTest'): argument
90 self.target = oeRuntimeTest.tc.target
91 super(oeRuntimeTest, self).__init__(methodName)
93 def setUp(self): argument
[all …]
/openbmc/openbmc/meta-security/lib/oeqa/runtime/cases/
H A Dsmack.py14 ''' base smack test '''
24 'Test requires smack to be in DISTRO_FEATURES')
25 @OEHasPackage(['smack-test'])
27 def test_smack_basic(self): argument
28 status,output = self.target.run("cat /proc/self/attr/current")
29 self.current_label = output.strip()
32 def test_add_access_label(self): argument
33 ''' Test if chsmack can correctly set a SMACK label '''
35 self.target.run("touch %s" %filename)
36 status, output = self.target.run("chsmack -a %s %s" %(LABEL, filename))
[all …]
/openbmc/openbmc/poky/scripts/lib/resulttool/
H A Dreport.py1 # test result tool - report text based test results
6 # SPDX-License-Identifier: GPL-2.0-only
18 def __init__(self): argument
19 self.ptests = {}
20 self.ltptests = {}
21 self.ltpposixtests = {}
22 self.result_types = {'passed': ['PASSED', 'passed', 'PASS', 'XFAIL'],
27 def handle_ptest_result(self, k, status, result, machine): argument
28 if machine not in self.ptests:
29 self.ptests[machine] = {}
[all …]
/openbmc/openbmc/poky/bitbake/lib/toaster/tests/views/
H A Dtest_views.py5 # Copyright (C) 2013-2015 Intel Corporation
7 # SPDX-License-Identifier: GPL-2.0-only
10 """Test cases for Toaster GUI and ReST."""
14 from django.test import TestCase
15 from django.test.client import RequestFactory
33 PROJECT_NAME = "test project"
34 PROJECT_NAME2 = "test project 2"
42 fixtures = ['toastergui-unittest-data']
45 def setUp(self): argument
47 self.project = Project.objects.first()
[all …]

12345678910>>...41