diff --git a/avocado/job.py b/avocado/job.py index 356e472113c3fe3de9cd1058ff4155e2d805e77a..10bf4801341d3650508850b6d9d165db00145ae8 100644 --- a/avocado/job.py +++ b/avocado/job.py @@ -79,9 +79,11 @@ class TestRunner(object): module_name = os.path.basename(test_path).split('.')[0] if not os.path.exists(test_path): # Try to resolve test ID (keep compatibility) - test_path = os.path.join(data_dir.get_test_dir(), '%s.py' % t_id) + rel_path = '%s.py' % t_id + test_path = os.path.join(data_dir.get_test_dir(), rel_path) if os.path.exists(test_path): path_analyzer = path.PathInspector(test_path) + t_id = rel_path else: test_class = test.MissingTest test_instance = test_class(name=t_id, diff --git a/selftests/all/functional/avocado/basic_tests.py b/selftests/all/functional/avocado/basic_tests.py index 527a21093094c8b2d44e1bd30476aaf635a444f2..360afed5c9696eca105fbde37a170d98f8d27c61 100644 --- a/selftests/all/functional/avocado/basic_tests.py +++ b/selftests/all/functional/avocado/basic_tests.py @@ -84,9 +84,9 @@ class RunnerOperationTest(unittest.TestCase): "Avocado did not return rc %d:\n%s" % (expected_rc, result)) self.assertIn("TestError: Failing during cleanup. Yay!", output, "Cleanup exception not printed to log output") - self.assertIn("FAIL doublefail -> TestFail: This test is supposed to fail", + self.assertIn("TestFail: This test is supposed to fail", output, - "Test did not fail with action exception") + "Test did not fail with action exception:\n%s" % output) def test_runner_timeout(self): os.chdir(basedir) @@ -99,9 +99,9 @@ class RunnerOperationTest(unittest.TestCase): "Avocado crashed (rc %d):\n%s" % (unexpected_rc, result)) self.assertEqual(result.exit_status, expected_rc, "Avocado did not return rc %d:\n%s" % (expected_rc, result)) - self.assertIn("ERROR timeouttest -> TestTimeoutError: Timeout reached waiting for timeouttest to end", + self.assertIn("TestTimeoutError: Timeout reached waiting for", output, - "Test did not fail with timeout exception") + "Test did not fail with timeout exception:\n%s" % output) def test_runner_abort(self): os.chdir(basedir)