diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2016-10-27 16:39:47 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:05:19 +0000 |
commit | b61326efb1bc66202831f9710716b5171a722039 (patch) | |
tree | 31e229ee225f0a816eb60a5fb721b021f8eab3e2 /meta/lib/oeqa/runtime/logrotate.py | |
parent | ba1aec3407e38f4dc4141e4d6300b3d538dc9dd3 (diff) | |
download | poky-b61326efb1bc66202831f9710716b5171a722039.tar.gz |
oeqa/runtime: Move to runtime_cases
The new oeqa core framework will modify the structure of the runtime
folder the new runtime folder will have python code inside to support
runtime test cases.
(From OE-Core rev: 637b712096e9d230e15b1a432a561e4118db34c8)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/logrotate.py')
-rw-r--r-- | meta/lib/oeqa/runtime/logrotate.py | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/meta/lib/oeqa/runtime/logrotate.py b/meta/lib/oeqa/runtime/logrotate.py deleted file mode 100644 index 063280b5f7..0000000000 --- a/meta/lib/oeqa/runtime/logrotate.py +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | # This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=289 testcase | ||
2 | # Note that the image under test must have logrotate installed | ||
3 | |||
4 | import unittest | ||
5 | from oeqa.oetest import oeRuntimeTest, skipModule | ||
6 | from oeqa.utils.decorators import * | ||
7 | |||
8 | def setUpModule(): | ||
9 | if not oeRuntimeTest.hasPackage("logrotate"): | ||
10 | skipModule("No logrotate package in image") | ||
11 | |||
12 | |||
13 | class LogrotateTest(oeRuntimeTest): | ||
14 | |||
15 | @testcase(1544) | ||
16 | @skipUnlessPassed("test_ssh") | ||
17 | def test_1_logrotate_setup(self): | ||
18 | (status, output) = self.target.run('mkdir $HOME/logrotate_dir') | ||
19 | self.assertEqual(status, 0, msg = "Could not create logrotate_dir. Output: %s" % output) | ||
20 | (status, output) = self.target.run("sed -i \"s#wtmp {#wtmp {\\n olddir $HOME/logrotate_dir#\" /etc/logrotate.conf") | ||
21 | self.assertEqual(status, 0, msg = "Could not write to logrotate.conf file. Status and output: %s and %s)" % (status, output)) | ||
22 | |||
23 | @testcase(1542) | ||
24 | @skipUnlessPassed("test_1_logrotate_setup") | ||
25 | def test_2_logrotate(self): | ||
26 | (status, output) = self.target.run('logrotate -f /etc/logrotate.conf') | ||
27 | self.assertEqual(status, 0, msg = "logrotate service could not be reloaded. Status and output: %s and %s" % (status, output)) | ||
28 | output = self.target.run('ls -la $HOME/logrotate_dir/ | wc -l')[1] | ||
29 | self.assertTrue(int(output)>=3, msg = "new logfile could not be created. List of files within log directory: %s" %(self.target.run('ls -la $HOME/logrotate_dir')[1])) | ||
30 | self.target.run('rm -rf $HOME/logrotate_dir') | ||