diff options
author | Randy MacLeod <Randy.MacLeod@windriver.com> | 2017-06-02 15:42:46 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-05 09:19:51 +0100 |
commit | a89fe5ec17916206cceb72886d9d135196acb84a (patch) | |
tree | df23d91172edc80bc20e5f04e33e05e6147c3a25 /meta/lib/oeqa | |
parent | f16368d2c50fa12df4145c0ae8402f771f3da186 (diff) | |
download | poky-a89fe5ec17916206cceb72886d9d135196acb84a.tar.gz |
oeqa/core: Improve grammar in README and loader comments
(From OE-Core rev: 48cd7ff7ae61ca5772a42ece9fce51976dd0d790)
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/core/README | 37 | ||||
-rw-r--r-- | meta/lib/oeqa/core/loader.py | 8 |
2 files changed, 22 insertions, 23 deletions
diff --git a/meta/lib/oeqa/core/README b/meta/lib/oeqa/core/README index f67dff7cff..d4fcda41f2 100644 --- a/meta/lib/oeqa/core/README +++ b/meta/lib/oeqa/core/README | |||
@@ -2,34 +2,34 @@ | |||
2 | 2 | ||
3 | == Introduction == | 3 | == Introduction == |
4 | 4 | ||
5 | This is the new (version 2) OEQA framework. Base clases are located inside the | 5 | This is version 2 of the OEQA framework. Base clases are located in the |
6 | 'oeqa/core' folder and subsequent components needs to extend from these. | 6 | 'oeqa/core' directory and subsequent components must extend from these. |
7 | 7 | ||
8 | The main design consideration was to implement the needed functionality | 8 | The main design consideration was to implement the needed functionality on |
9 | on top of Python unittest framework. To archive the latter, the following | 9 | top of the Python unittest framework. To achieve this goal, the following |
10 | modules are present: | 10 | modules are used: |
11 | 11 | ||
12 | * oeqa/core/runner.py: Provides OETestResult and OETestRunner base | 12 | * oeqa/core/runner.py: Provides OETestResult and OETestRunner base |
13 | classes extending the unittest ones. This class has the support for | 13 | classes extending the unittest class. These classes support exporting |
14 | export results to different formats currently RAW and XML. | 14 | results to different formats; currently RAW and XML support exist. |
15 | 15 | ||
16 | * oeqa/core/loader.py: Provides OETestLoader extending unittest ones, | 16 | * oeqa/core/loader.py: Provides OETestLoader extending the unittest class. |
17 | also implements unified way for decorator support and for filtering test | 17 | It also features a unified implementation of decorator support and |
18 | cases. | 18 | filtering test cases. |
19 | 19 | ||
20 | * oeqa/core/case.py: Provides OETestCase base class extending | 20 | * oeqa/core/case.py: Provides OETestCase base class extending |
21 | unittest.TestCase and provides access to the Test data (td), Test context | 21 | unittest.TestCase and provides access to the Test data (td), Test context |
22 | and Logger functionality. | 22 | and Logger functionality. |
23 | 23 | ||
24 | * oeqa/core/decorator: Provides OETestDecorator a new class to implement | 24 | * oeqa/core/decorator: Provides OETestDecorator, a new class to implement |
25 | decorators for Test cases. | 25 | decorators for Test cases. |
26 | 26 | ||
27 | * oeqa/core/context: Provides OETestContext a high-level API for | 27 | * oeqa/core/context: Provides OETestContext, a high-level API for |
28 | loadTests and runTests of certain Test component and | 28 | loadTests and runTests of certain Test component and |
29 | OETestContextExecutor a base class to enable oe-test to discover/use | 29 | OETestContextExecutor a base class to enable oe-test to discover/use |
30 | the Test component. | 30 | the Test component. |
31 | 31 | ||
32 | In the other hand, a new 'oe-test' runner is located under 'scripts', allowing scans for components | 32 | Also, a new 'oe-test' runner is located under 'scripts', allowing scans for components |
33 | that supports OETestContextExecutor (see below). | 33 | that supports OETestContextExecutor (see below). |
34 | 34 | ||
35 | == Terminology == | 35 | == Terminology == |
@@ -39,15 +39,14 @@ that supports OETestContextExecutor (see below). | |||
39 | * Test data: Data associated with the Test component. Currently we use bitbake datastore as | 39 | * Test data: Data associated with the Test component. Currently we use bitbake datastore as |
40 | a Test data input. | 40 | a Test data input. |
41 | 41 | ||
42 | * Test context: A context of what tests needs to be run and how to do it, additionally provides | 42 | * Test context: A context of what tests needs to be run and how to do it; this additionally |
43 | access to the Test data and could have custom methods, attrs. | 43 | provides access to the Test data and could have custom methods and/or attrs. |
44 | 44 | ||
45 | == oe-test == | 45 | == oe-test == |
46 | 46 | ||
47 | The new tool oe-test (located at scripts) has the ability to scan the code base for test | 47 | The new tool, oe-test, has the ability to scan the code base for test components and provide |
48 | components and provide a unified way to run test cases. Internally it scans folders inside | 48 | a unified way to run test cases. Internally it scans folders inside oeqa module in order to find |
49 | oeqa module in order to find specific classes that | 49 | specific classes that implement a test component. |
50 | implements a test component. | ||
51 | 50 | ||
52 | == Usage == | 51 | == Usage == |
53 | 52 | ||
diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py index bffb2dac8d..51bfd9de01 100644 --- a/meta/lib/oeqa/core/loader.py +++ b/meta/lib/oeqa/core/loader.py | |||
@@ -14,11 +14,11 @@ from oeqa.core.decorator import decoratorClasses, OETestDecorator, \ | |||
14 | 14 | ||
15 | def _make_failed_test(classname, methodname, exception, suiteClass): | 15 | def _make_failed_test(classname, methodname, exception, suiteClass): |
16 | """ | 16 | """ |
17 | When loading tests unittest framework stores the exception in a new | 17 | When loading tests, the unittest framework stores any exceptions and |
18 | class created for be displayed into run(). | 18 | displays them only when the 'run' method is called. |
19 | 19 | ||
20 | For our purposes will be better to raise the exception in loading | 20 | For our purposes, it is better to raise the exceptions in the loading |
21 | step instead of wait to run the test suite. | 21 | step rather than waiting to run the test suite. |
22 | """ | 22 | """ |
23 | raise exception | 23 | raise exception |
24 | unittest.loader._make_failed_test = _make_failed_test | 24 | unittest.loader._make_failed_test = _make_failed_test |