diff options
| -rw-r--r-- | lib/oeqa/runtime/cases/libipt.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/libipt.py b/lib/oeqa/runtime/cases/libipt.py new file mode 100644 index 00000000..4adb13f0 --- /dev/null +++ b/lib/oeqa/runtime/cases/libipt.py | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 2 | from oeqa.runtime.decorator.package import OEHasPackage | ||
| 3 | from oeqa.core.decorator.depends import OETestDepends | ||
| 4 | |||
| 5 | class LibiptTest(OERuntimeTestCase): | ||
| 6 | libipt_bin_dir = '/usr/bin/libipt/' | ||
| 7 | |||
| 8 | @classmethod | ||
| 9 | def tearDownClass(cls): | ||
| 10 | cls.tc.target.run('rm /tmp/loop-tnt*') | ||
| 11 | |||
| 12 | @OEHasPackage(['libipt', 'libipt2']) | ||
| 13 | @OEHasPackage(['libipt-test']) | ||
| 14 | @OEHasPackage(['yasm']) | ||
| 15 | def test_libipt_can_generate_trace_packet(self): | ||
| 16 | (status, output) = self.target.run('cd /tmp; %spttc %s/tests/loop-tnt.ptt' % | ||
| 17 | (self.libipt_bin_dir, self.libipt_bin_dir)) | ||
| 18 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
| 19 | |||
| 20 | @OETestDepends(['libipt.LibiptTest.test_libipt_can_generate_trace_packet']) | ||
| 21 | def test_libipt_can_perform_trace_packet_dump(self): | ||
| 22 | (status, output) = self.target.run('cd /tmp; %sptdump loop-tnt.pt' % self.libipt_bin_dir) | ||
| 23 | self.assertEqual(status, 0, msg='status and output: %s and %s' % (status, output)) | ||
