Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by mx.groups.io with SMTP id smtpd.web10.679.1592348884863729764 for ; Tue, 16 Jun 2020 16:08:05 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: windriver.com, ip: 147.11.146.13, mailfrom: mark.morton@windriver.com) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.2) with ESMTPS id 05GN84mH000980 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 16 Jun 2020 16:08:04 -0700 (PDT) Received: from san-mmorton-lx1.corp.ad.wrs.com (147.11.4.21) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.487.0; Tue, 16 Jun 2020 16:08:03 -0700 From: "Mark Morton" To: Subject: [PATCH] Fixed codeblock formatting in test-manual Date: Tue, 16 Jun 2020 16:03:34 -0700 Message-ID: <20200616230334.9814-1-mark.morton@windriver.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by mail1.windriver.com id 05GN84mH000980 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Mark Morton --- .../test-manual/test-manual-intro.xml | 79 ++++++++----------- .../test-manual-understand-autobuilder.xml | 21 ++--- 2 files changed, 45 insertions(+), 55 deletions(-) diff --git a/documentation/test-manual/test-manual-intro.xml b/documentat= ion/test-manual/test-manual-intro.xml index 5e9def894..90d522b9b 100644 --- a/documentation/test-manual/test-manual-intro.xml +++ b/documentation/test-manual/test-manual-intro.xml @@ -213,52 +213,41 @@ Tests map into the codebase as follows: - bitbake-selftest: - - These tests are self-contained and= test BitBake as well as its - APIs, which include the fetchers. Th= e tests are located in - bitbake/lib/*/tests. - - - From within the BitBake repository= , run the following: - + bitbake-selftest: + These tests are self-contained and test BitBak= e as well as its APIs, which + include the fetchers. The tests are located in + bitbake/lib/*/tests. + From within the BitBake repository, run the fo= llowing: + $ bitbake-selftest - - - - To skip tests that access the Inte= rnet, use the - BB_SKIP_NETTEST variable when running - "bitbake-selftest" as follows: - + + To skip tests that access the Internet, use th= e + BB_SKIP_NETTEST variabl= e when running + "bitbake-selftest" as follows: + $ BB_SKIP_NETTEST=3Dyes bitbake-selftest - The - default output is quiet and just pri= nts a summary of what was - run. To see more information, there = is a verbose - option: + + The default output is quiet and just prints a = summary of what was run. To + see more information, there is a verbose + option: $ bitbake-selftest -v - Use this option when you wish to s= kip tests that access the - network, which are mostly necessary = to test the fetcher modules. - To specify individual test modules t= o run, append the test - module name to the "bitbake-selftest= " command. For example, to - specify the tests for the bb.data.mo= dule, run: - + Use this option when you wish to skip tests th= at access the network, which + are mostly necessary to test the fetcher modules= . To specify individual test + modules to run, append the test module name to t= he "bitbake-selftest" + command. For example, to specify the tests for t= he bb.data.module, run: + $ bitbake-selftest bb.test.data.module You - can also specify individual tests by= defining the full name and - module plus the class path of the te= st, for example: - + can also specify individual tests by defining th= e full name and module plus + the class path of the test, for example: + $ bitbake-selftest bb.tests.data.TestOverrides.test_one_override - - - The tests are based on Python - unittest. - - - + The tests are based on Python + unittest. oe-selftest: @@ -296,12 +285,12 @@ For example, the following command w= ould run the tinfoil getVar API - test: + test: $ oe-selftest -r tinfoil.TinfoilTests.test_getvar It is also possible to run a set of tes= ts. For example the following command will run all of th= e tinfoil - tests: + tests: $ oe-selftest -r tinfoil @@ -407,7 +396,7 @@ <filename>bitbake-selftest</filename> =20 A simple test example from lib/bb/tests/data= .py is: - + class DataExpansions(unittest.TestCase): def setUp(self): self.d =3D bb.data.init() @@ -437,7 +426,7 @@ builds. Rather than directly using Python's unittest, th= e code wraps most of the standard objects. The tests can be simple, such as testi= ng a command from within the OE build environment using the following - example: + example: class BitbakeLayers(OESelftestTestCase): def test_bitbakelayers_showcrossdepends(self): result =3D runCmd('bitbake-layers show-cross-depends') = =20 @@ -486,7 +475,7 @@ under QEMU. As a result, they are assumed to be running = in a target image environment, as opposed to a host build environment. A s= imple example from meta/lib/oeqa/runtime/cases/python.py contains the - following: + following: class PythonTest(OERuntimeTestCase): @OETestDepends(['ssh.SSHTest.test_ssh']) @OEHasPackage(['python3-core']) @@ -513,7 +502,7 @@ These tests are run against built extensible SDKs (eSD= Ks). The tests can assume that the eSDK environment has already been setup. An exa= mple from meta/lib/oeqa/sdk/cases/devtool.py contains the - following: + following: class DevtoolTest(OESDKExtTestCase): @classmethod def setUpClass(cls): @@ -547,7 +536,7 @@ These tests are run against built SDKs. The tests can = assume that an SDK has already been extracted and its environment file has been= sourced. A simple example from meta/lib/oeqa/sdk/cases/python2.py contains the - following: + following: class Python3Test(OESDKTestCase): def setUp(self): if not (self.tc.hasHostPackage("nativesdk-python3-core") or @@ -570,7 +559,7 @@ The performance tests usually measure how long operati= ons take and the resource utilisation as that happens. An example from meta/lib/oeqa/buildperf/test_basic.py contains the - following: + following: class Test3(BuildPerfTestCase): =20 def test3(self): diff --git a/documentation/test-manual/test-manual-understand-autobuilder= .xml b/documentation/test-manual/test-manual-understand-autobuilder.xml index 754130535..5c54cd57e 100644 --- a/documentation/test-manual/test-manual-understand-autobuilder.xml +++ b/documentation/test-manual/test-manual-understand-autobuilder.xml @@ -19,7 +19,7 @@ config.json file within the yocto-autobuilder-helper repository= . The targets are defined in the =E2=80=98overrides=E2=80=99 section, a quick example cou= ld be qemux86-64 which looks - like: + like: "qemux86-64" : { "MACHINE" : "qemux86-64", "TEMPLATE" : "arch-qemu", @@ -31,7 +31,7 @@ }, And to expand that, you need the =E2=80=9Carch-qemu=E2=80=9D ent= ry from the =E2=80=9Ctemplates=E2=80=9D section, which looks - like: + like: "arch-qemu" : { "BUILDINFO" : true, "BUILDHISTORY" : true, @@ -51,11 +51,12 @@ } }, Combining - these two entries you can see that =E2=80=9Cqemux86-64=E2=80= =9D is a three step build where the =E2=80=9Cbitbake - BBTARGETS=E2=80=9D would be run, then =E2=80=9Cbitbake SANIT= YTARGETS=E2=80=9D for each step; all for - MACHINE=3D=E2=80=9Dqemx86-64=E2=80=9D but with differing SDK= MACHINE settings. In step 1 an extra variable - is added to the auto.conf file to enabl= e wic image - generation. + these two entries you can see that =E2=80=9Cqemux86-64=E2=80= =9D is a three step build where the + bitbake BBTARGETS would be run, the= n bitbake + SANITYTARGETS for each step; all for + MACHINE=3D=E2=80=9Dqemx86-64=E2=80=9D but with differing SDKMACHINE settings. In + step 1 an extra variable is added to the auto.conf= file to enable + wic image generation. While not every detail of this is covered here, you can se= e how the templating mechanism allows quite complex configurations to be built up= yet allows duplication and repetition to be kept to a minimum. @@ -283,18 +284,18 @@ substitution of the paths. The Helper script repository incl= udes a local-example.json file to show how= you could override these from a separate configuration file. Pass the following into = the environment of the - Autobuilder: + Autobuilder: $ ABHELPER_JSON=3D"config.json local-example.json" As another example, you could also pass the following into the - environment: + environment: $ ABHELPER_JSON=3D"config.json /some/location/local.json" One issue users often run into is validation of the co= nfig.json files. A tip for minimizing issues from invalid json files is to us= e a Git pre-commit-hook.sh script to verify= the JSON file before committing it. Create a symbolic link as - follows: + follows: $ ln -s ../../scripts/pre-commit-hook.sh .git/hooks/pre-commit --=20 2.17.1