|
44 | 44 | from . import build_expectations |
45 | 45 |
|
46 | 46 | from . terminal import terminal |
47 | | -from . build_exceptions import TestError |
| 47 | +from . build_exceptions import ErrorInTest |
48 | 48 |
|
49 | 49 | # Globals: |
50 | 50 | builds = build_expectations.Builds() |
@@ -128,7 +128,7 @@ def _set_expected_opts(self, opts): |
128 | 128 | if opts: |
129 | 129 | if not isinstance(opts, tuple) or \ |
130 | 130 | not isinstance(opts[0][0], OperationSettings): |
131 | | - raise TestError(msg=err_msg, frame=gfi(cf()), |
| 131 | + raise ErrorInTest(msg=err_msg, frame=gfi(cf()), |
132 | 132 | errnum=errno.ESPIPE) |
133 | 133 | self.__expected_opts = opts |
134 | 134 |
|
@@ -180,7 +180,7 @@ def collect_pkgs(self): |
180 | 180 | pkg_search = dist + "/rpms/build/*.rpm" |
181 | 181 | pkg_re = re.compile('el(\d+)\.noarch') |
182 | 182 | else: |
183 | | - raise TestError(opt.os_type, frame=gfi(cf()), |
| 183 | + raise ErrorInTest(opt.os_type, frame=gfi(cf()), |
184 | 184 | errnum=errno.ESPIPE, |
185 | 185 | msg='opt.os_type(%s) is not recognized!') |
186 | 186 | entropy = glob.glob(pkg_search) |
@@ -208,7 +208,7 @@ def collect_pkgs(self): |
208 | 208 | break |
209 | 209 | if not found: |
210 | 210 | self._set_failure_reason = \ |
211 | | - TestError(opt.os_type, opt.version, |
| 211 | + ErrorInTest(opt.os_type, opt.version, |
212 | 212 | frame=gfi(cf()), errno=errno.ESPIPE, |
213 | 213 | msg='No pkg found built for') |
214 | 214 | print(str(self.failure_reason)) |
@@ -266,7 +266,7 @@ def test(self, pkg): |
266 | 266 | msg = "Failed to build docker container to test with" |
267 | 267 | if frame: |
268 | 268 | self._set_failure_reason = \ |
269 | | - TestError(pkg.pkg, msg=msg, frame=frame, errnum=errno.ESPIPE) |
| 269 | + ErrorInTest(pkg.pkg, msg=msg, frame=frame, errnum=errno.ESPIPE) |
270 | 270 | raise self.failure_reason |
271 | 271 |
|
272 | 272 |
|
@@ -301,13 +301,13 @@ def main(): |
301 | 301 | try: |
302 | 302 | tests = InstallTest() |
303 | 303 | tests.execute_tests() |
304 | | - except TestError as Error: |
| 304 | + except ErrorInTest as Error: |
305 | 305 | print(str(Error)) |
306 | 306 | exit(1) |
307 | 307 | traceback.print_exc() |
308 | 308 | except Exception as Error: |
309 | 309 | print(str(Error)) |
310 | | - TestError(Error, frame=gfi(cf()), errno=-1) |
| 310 | + ErrorInTest(Error, frame=gfi(cf()), errno=-1) |
311 | 311 | print(str(Error)) |
312 | 312 | traceback.print_exc() |
313 | 313 |
|
|
0 commit comments