diff options
| -rw-r--r-- | meta/lib/oeqa/runtime/smart.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py index 6cdb10d631..a15e4027d8 100644 --- a/meta/lib/oeqa/runtime/smart.py +++ b/meta/lib/oeqa/runtime/smart.py | |||
| @@ -2,6 +2,7 @@ import unittest | |||
| 2 | import re | 2 | import re |
| 3 | import oe | 3 | import oe |
| 4 | import subprocess | 4 | import subprocess |
| 5 | from time import sleep | ||
| 5 | from oeqa.oetest import oeRuntimeTest, skipModule | 6 | from oeqa.oetest import oeRuntimeTest, skipModule |
| 6 | from oeqa.utils.decorators import * | 7 | from oeqa.utils.decorators import * |
| 7 | from oeqa.utils.httpserver import HTTPService | 8 | from oeqa.utils.httpserver import HTTPService |
| @@ -144,13 +145,21 @@ class SmartRepoTest(SmartTest): | |||
| 144 | @skipUnlessPassed('test_smart_channel_add') | 145 | @skipUnlessPassed('test_smart_channel_add') |
| 145 | def test_smart_install(self): | 146 | def test_smart_install(self): |
| 146 | self.smart('remove -y psplash-default') | 147 | self.smart('remove -y psplash-default') |
| 148 | # NOTE: this sleep is a hack for working around #10244 | ||
| 149 | sleep(1) | ||
| 147 | self.smart('install -y psplash-default') | 150 | self.smart('install -y psplash-default') |
| 151 | # NOTE: this sleep is a hack for working around #10244 | ||
| 152 | sleep(1) | ||
| 148 | 153 | ||
| 149 | @testcase(728) | 154 | @testcase(728) |
| 150 | @skipUnlessPassed('test_smart_install') | 155 | @skipUnlessPassed('test_smart_install') |
| 151 | def test_smart_install_dependency(self): | 156 | def test_smart_install_dependency(self): |
| 152 | self.smart('remove -y psplash') | 157 | self.smart('remove -y psplash') |
| 158 | # NOTE: this sleep is a hack for working around #10244 | ||
| 159 | sleep(1) | ||
| 153 | self.smart('install -y psplash-default') | 160 | self.smart('install -y psplash-default') |
| 161 | # NOTE: this sleep is a hack for working around #10244 | ||
| 162 | sleep(1) | ||
| 154 | 163 | ||
| 155 | @testcase(723) | 164 | @testcase(723) |
| 156 | @skipUnlessPassed('test_smart_channel_add') | 165 | @skipUnlessPassed('test_smart_channel_add') |
| @@ -158,6 +167,8 @@ class SmartRepoTest(SmartTest): | |||
| 158 | self.smart('remove -y psplash-default') | 167 | self.smart('remove -y psplash-default') |
| 159 | self.smart('download psplash-default') | 168 | self.smart('download psplash-default') |
| 160 | self.smart('install -y ./psplash-default*') | 169 | self.smart('install -y ./psplash-default*') |
| 170 | # NOTE: this sleep is a hack for working around #10244 | ||
| 171 | sleep(1) | ||
| 161 | 172 | ||
| 162 | @testcase(725) | 173 | @testcase(725) |
| 163 | @skipUnlessPassed('test_smart_channel_add') | 174 | @skipUnlessPassed('test_smart_channel_add') |
| @@ -166,19 +177,29 @@ class SmartRepoTest(SmartTest): | |||
| 166 | url = re.search('(http://.*/psplash-default.*\.rpm)', output) | 177 | url = re.search('(http://.*/psplash-default.*\.rpm)', output) |
| 167 | self.assertTrue(url, msg="Couln't find download url in %s" % output) | 178 | self.assertTrue(url, msg="Couln't find download url in %s" % output) |
| 168 | self.smart('remove -y psplash-default') | 179 | self.smart('remove -y psplash-default') |
| 180 | # NOTE: this sleep is a hack for working around #10244 | ||
| 181 | sleep(1) | ||
| 169 | self.smart('install -y %s' % url.group(0)) | 182 | self.smart('install -y %s' % url.group(0)) |
| 183 | # NOTE: this sleep is a hack for working around #10244 | ||
| 184 | sleep(1) | ||
| 170 | 185 | ||
| 171 | @testcase(729) | 186 | @testcase(729) |
| 172 | @skipUnlessPassed('test_smart_install') | 187 | @skipUnlessPassed('test_smart_install') |
| 173 | def test_smart_reinstall(self): | 188 | def test_smart_reinstall(self): |
| 174 | self.smart('reinstall -y psplash-default') | 189 | self.smart('reinstall -y psplash-default') |
| 190 | # NOTE: this sleep is a hack for working around #10244 | ||
| 191 | sleep(1) | ||
| 175 | 192 | ||
| 176 | @testcase(727) | 193 | @testcase(727) |
| 177 | @skipUnlessPassed('test_smart_channel_add') | 194 | @skipUnlessPassed('test_smart_channel_add') |
| 178 | def test_smart_remote_repo(self): | 195 | def test_smart_remote_repo(self): |
| 179 | self.smart('update') | 196 | self.smart('update') |
| 180 | self.smart('install -y psplash') | 197 | self.smart('install -y psplash') |
| 198 | # NOTE: this sleep is a hack for working around #10244 | ||
| 199 | sleep(1) | ||
| 181 | self.smart('remove -y psplash') | 200 | self.smart('remove -y psplash') |
| 201 | # NOTE: this sleep is a hack for working around #10244 | ||
| 202 | sleep(1) | ||
| 182 | 203 | ||
| 183 | @testcase(726) | 204 | @testcase(726) |
| 184 | def test_smart_local_dir(self): | 205 | def test_smart_local_dir(self): |
| @@ -192,6 +213,8 @@ class SmartRepoTest(SmartTest): | |||
| 192 | self.smart('channel --disable '+str(i)) | 213 | self.smart('channel --disable '+str(i)) |
| 193 | self.target.run('cd $HOME') | 214 | self.target.run('cd $HOME') |
| 194 | self.smart('install psplash') | 215 | self.smart('install psplash') |
| 216 | # NOTE: this sleep is a hack for working around #10244 | ||
| 217 | sleep(1) | ||
| 195 | for i in output.split("\n"): | 218 | for i in output.split("\n"): |
| 196 | if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)): | 219 | if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)): |
| 197 | self.smart('channel --enable '+str(i)) | 220 | self.smart('channel --enable '+str(i)) |
| @@ -215,4 +238,6 @@ class SmartRepoTest(SmartTest): | |||
| 215 | @skipUnlessPassed('test_smart_channel_add') | 238 | @skipUnlessPassed('test_smart_channel_add') |
| 216 | def test_smart_remove_package(self): | 239 | def test_smart_remove_package(self): |
| 217 | self.smart('install -y psplash') | 240 | self.smart('install -y psplash') |
| 241 | # NOTE: this sleep is a hack for working around #10244 | ||
| 242 | sleep(1) | ||
| 218 | self.smart('remove -y psplash') | 243 | self.smart('remove -y psplash') |
