summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/siggen.py
blob: 0dc67e6cc212aacf76f3b53471a9917a5ccc1137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
# BitBake Test for lib/bb/siggen.py
#
# Copyright (C) 2020 Jean-François Dagenais
#
# SPDX-License-Identifier: GPL-2.0-only
#

import unittest
import logging
import bb
import time

logger = logging.getLogger('BitBake.TestSiggen')

import bb.siggen

class SiggenTest(unittest.TestCase):

    def test_build_pnid(self):
        tests = {
            ('', 'helloworld', 'do_sometask') : 'helloworld:do_sometask',
            ('XX', 'helloworld', 'do_sometask') : 'mc:XX:helloworld:do_sometask',
        }

        for t in tests:
            self.assertEqual(bb.siggen.build_pnid(*t), tests[t])