Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 1 | # |
| 2 | # BitBake Test for lib/bb/siggen.py |
| 3 | # |
| 4 | # Copyright (C) 2020 Jean-François Dagenais |
| 5 | # |
| 6 | # SPDX-License-Identifier: GPL-2.0-only |
| 7 | # |
| 8 | |
| 9 | import unittest |
| 10 | import logging |
| 11 | import bb |
| 12 | import time |
| 13 | |
| 14 | logger = logging.getLogger('BitBake.TestSiggen') |
| 15 | |
| 16 | import bb.siggen |
| 17 | |
| 18 | class SiggenTest(unittest.TestCase): |
| 19 | |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 20 | def test_build_pnid(self): |
| 21 | tests = { |
| 22 | ('', 'helloworld', 'do_sometask') : 'helloworld:do_sometask', |
| 23 | ('XX', 'helloworld', 'do_sometask') : 'mc:XX:helloworld:do_sometask', |
| 24 | } |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 25 | |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 26 | for t in tests: |
| 27 | self.assertEqual(bb.siggen.build_pnid(*t), tests[t]) |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 28 | |