Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import unittest
- from oeqa.oetest import oeRuntimeTest
- from oeqa.utils.decorators import *
- test_script = "test_net_interfaces.sh"
- class RuntimeTest(oeRuntimeTest):
- @testcase(3)
- @skipUnlessPassed("test_ssh")
- def test_net_log_ifconfig(self):
- test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True)
- (status, output) = self.target.copy_to(os.path.join(test_log_dir, "oeqa/runtime/files/scripts/" + test_script), '/tmp/')
- (status, output) = self.target.run("/tmp/" + test_script + " -i ifconfig")
- self.assertEqual(status, 0, msg = "test failed")
- @testcase(3.1)
- @skipUnlessPassed('test_net_log_ifconfig')
- def test_net_wlan0(self):
- test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True)
- (status, output) = self.target.run("/tmp/" + test_script + " -i wlan0")
- self.assertEqual(status, 0, msg = "test failed")
- @testcase(3.2)
- @skipUnlessPassed("test_ssh")
- @skipUnlessPassed(3)
- def test_net_wlan1(self):
- test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True)
- (status, output) = self.target.run("/tmp/" + test_script + " -i wlan1")
- self.assertEqual(status, 0, msg = "test failed")
- @testcase(3.3)
- @skipUnlessPassed('test_net_log_ifconfig')
- def test_net_eth0(self):
- test_log_dir = oeRuntimeTest.tc.d.getVar("TEST_LOG_DIR", True)
- (status, output) = self.target.run("/tmp/" + test_script + " -i eth0")
- self.assertEqual(status, 0, msg = "test failed")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement