aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/scanelf.py
blob: b9abf24640ff22ac7e1b69a3d5d0e9fac53b58bd (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
import unittest
from oeqa.oetest import oeRuntimeTest, skipModule
from oeqa.utils.decorators import *

def setUpModule():
    if not oeRuntimeTest.hasPackage("pax-utils"):
        skipModule("pax-utils package not installed")

class ScanelfTest(oeRuntimeTest):

    def setUp(self):
        self.scancmd = 'scanelf --quiet --recursive --mount --ldpath --path'

    @skipUnlessPassed('test_ssh')
    def test_scanelf_textrel(self):
        # print TEXTREL information
        self.scancmd += " --textrel"
        (status, output) = self.target.run(self.scancmd)
        self.assertEqual(output.strip(), "", "\n".join([self.scancmd, output]))

    @skipUnlessPassed('test_ssh')
    def test_scanelf_rpath(self):
        # print RPATH information
        self.scancmd += " --rpath"
        (status, output) = self.target.run(self.scancmd)
        self.assertEqual(output.strip(), "", "\n".join([self.scancmd, output]))