1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7from oeqa.selftest.case import OESelftestTestCase
8from oeqa.utils.commands import bitbake, get_bb_var
9
10class PicolibcTest(OESelftestTestCase):
11
12    def test_picolibc(self):
13        compatible_machines = ['qemuarm', 'qemuarm64', 'qemuriscv32', 'qemuriscv64']
14        machine = get_bb_var('MACHINE')
15        if machine not in compatible_machines:
16            self.skipTest('This test only works with machines : %s' % ' '.join(compatible_machines))
17        self.write_config('TCLIBC = "picolibc"')
18        bitbake("picolibc-helloworld")
19