<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.yoctoproject.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BjornStenberg</id>
	<title>Yocto Project - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.yoctoproject.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BjornStenberg"/>
	<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/Special:Contributions/BjornStenberg"/>
	<updated>2026-04-23T11:47:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=9614</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=9614"/>
		<updated>2013-04-11T13:10:32Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in two parts:&lt;br /&gt;
&lt;br /&gt;
# Adding &amp;quot;ptest&amp;quot; to your DISTRO_FEATURES variable causes -ptest packages to be built.&lt;br /&gt;
# Adding &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES variable causes -ptest packages to be installed in your image.&lt;br /&gt;
&lt;br /&gt;
All ptest files are installed in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence. You may therefore want to add &amp;quot;ptest-runner&amp;quot; to your image.&lt;br /&gt;
&lt;br /&gt;
=Implementing ptest in a package recipe=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a [http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/automake/automake/buildtest.patch patch] which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to do anything else.&lt;br /&gt;
&lt;br /&gt;
If you need to do something more than the automatic &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=9108</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=9108"/>
		<updated>2013-03-08T12:47:29Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: /* Installing the test suite */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable and &amp;quot;ptest-pkgs&amp;quot; to the IMAGE_FEATURES variable in your image (or EXTRA_IMAGE_FEATURES in your local.conf). This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to add any ptest install actions.&lt;br /&gt;
&lt;br /&gt;
If you need to do anything more than &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=9107</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=9107"/>
		<updated>2013-03-08T12:46:55Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: Updated for new _ptest functions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable and &amp;quot;ptest-pkgs&amp;quot; to the IMAGE_FEATURES variable in your image (or EXTRA_IMAGE_FEATURES in your local.conf). This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling, since we need to build on host and run on target. So we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this automatically, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_ptest function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_ptest() {&lt;br /&gt;
      oe_runmake buildtest-TESTS&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
If the package requires special configuration actions prior to compiling the test code, create a do_configure_ptest function to do that.&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass will automatically copy the required &amp;quot;run-ptest&amp;quot; file and run &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. For packages where this is enough, you don&#039;t need to add any ptest install code.&lt;br /&gt;
&lt;br /&gt;
If you need to do anything more than &amp;quot;make install-ptest&amp;quot;, create a do_install_ptest function and put the required actions there. This function will be called after &amp;quot;make install-ptest&amp;quot; has completed.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8744</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8744"/>
		<updated>2013-02-08T15:01:25Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable and &amp;quot;ptest-pkgs&amp;quot; to the IMAGE_FEATURES variable in your image (or EXTRA_IMAGE_FEATURES in your local.conf). This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_install_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8743</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8743"/>
		<updated>2013-02-08T15:00:58Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable and &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES of your image (or EXTRA_IMAGE_FEATURES in your local.conf). This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_install_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8742</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8742"/>
		<updated>2013-02-08T15:00:36Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable and &amp;quot;ptest-pkgs&amp;quot; to IMAGE_FEATURES of your image, or EXTRA_IMAGE_FEATURES in your local.conf. This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_install_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8422</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8422"/>
		<updated>2013-01-17T09:12:37Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable. This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_install_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8418</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8418"/>
		<updated>2013-01-16T15:12:17Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable. This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The same format [http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests used by Automake].)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8413</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8413"/>
		<updated>2013-01-16T08:30:46Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable. This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolidate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; is one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string. (The the same format used by Automake: http://www.gnu.org/software/automake/manual/automake.html#Simple-Tests)&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest suffix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8330</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8330"/>
		<updated>2013-01-08T14:56:57Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages, and producing a consistent output format.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable. This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The test can be anything, from a simple shell script running a binary and checking its output to an elaborate system of test binaries and data files.&lt;br /&gt;
&lt;br /&gt;
One major point of ptest is to consolitate the output format of all tests into a single common format. The format selected is the automake &amp;quot;simple test&amp;quot; format:&lt;br /&gt;
&lt;br /&gt;
   result: testname&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;result&amp;quot; one of PASS, FAIL or SKIP and &amp;quot;testname&amp;quot; can be any identifying string.&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest prefix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8329</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8329"/>
		<updated>2013-01-08T14:52:40Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable. This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest support to a package=&lt;br /&gt;
&lt;br /&gt;
==What constitutes a ptest?==&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
==General recipe preparations==&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest prefix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Building the test suite==&lt;br /&gt;
&lt;br /&gt;
Few packages support cross-compiling their test suites, so this is something we typically have to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: &amp;quot;make check&amp;quot;. This doesn&#039;t work when cross-compiling (since we need to build on host and run on target), so we need to split that into two targets: One for building the test and one for running it. Our build of automake comes with a patch which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
==Installing the test suite==&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install_append function:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      ptest_do_install&lt;br /&gt;
   }&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8328</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8328"/>
		<updated>2013-01-08T14:50:19Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages.&lt;br /&gt;
&lt;br /&gt;
==Adding ptest to your build==&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable. This will cause ptest-enabled packages to build and install the test suite in /usr/lib/&amp;lt;package&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
==Running ptest==&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all installed ptest test suites and runs them in sequence.&lt;br /&gt;
&lt;br /&gt;
==Adding ptest support to a package==&lt;br /&gt;
&lt;br /&gt;
=What constitutes a ptest?=&lt;br /&gt;
&lt;br /&gt;
A ptest must at minimum contain two things: run-ptest and the actual test.&lt;br /&gt;
&lt;br /&gt;
run-ptest is a minimal shell script that &#039;&#039;starts&#039;&#039; the test suite. Note: It must not &#039;&#039;contain&#039;&#039; the test suite, only start it!&lt;br /&gt;
&lt;br /&gt;
The &lt;br /&gt;
&lt;br /&gt;
=General recipe preparations=&lt;br /&gt;
&lt;br /&gt;
First, add &amp;quot;ptest&amp;quot; to the &amp;quot;inherit&amp;quot; line in the package recipe.&lt;br /&gt;
&lt;br /&gt;
If a test adds build-time or run-time dependencies to the package which are not there normally (such as requiring &amp;quot;make&amp;quot; to run the test suite), add those with a -ptest prefix, like this:&lt;br /&gt;
&lt;br /&gt;
   RDEPENDS_${PN}-ptest += &amp;quot;make&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=Building the test suite=&lt;br /&gt;
&lt;br /&gt;
Very few packages support cross-compiling their test suites, so this is something we typically need to add.&lt;br /&gt;
&lt;br /&gt;
Many automake-based packages compile and run the test suite in a single command: make check. This doesn&#039;t work when cross-compiling, so we need to split that into two targets: One for building the test and one for running it. We include a patch in our build of automake which does this, so packages using the plain &amp;quot;make check&amp;quot; arrangement from automake get this automatically.&lt;br /&gt;
&lt;br /&gt;
Now add a do_compile_append function to build the test suite:&lt;br /&gt;
&lt;br /&gt;
   do_compile_append() {&lt;br /&gt;
      if [ &amp;quot;${PN}&amp;quot; = &amp;quot;${BPN}&amp;quot; -a ${PTEST_ENABLED} = &amp;quot;1&amp;quot; ]; then&lt;br /&gt;
         oe_runmake buildtest-TESTS&lt;br /&gt;
      fi&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
=Installing the test suite=&lt;br /&gt;
&lt;br /&gt;
The ptest.bbclass contains a ptest_do_install function which copies the required &amp;quot;run-ptest&amp;quot; file and runs &amp;quot;make install-ptest&amp;quot; if there is such a target in the top-level Makefile. This provides a standardized install method to use in the package do_install or do_install_append.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8327</id>
		<title>Ptest</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Ptest&amp;diff=8327"/>
		<updated>2013-01-08T13:39:40Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: Created page with &amp;quot;=Introduction=  Ptest (&amp;#039;&amp;#039;package test&amp;#039;&amp;#039;) is a concept for building, installing and running the test suites that are included in many packages.  =Adding ptest to your build=  Ptes...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Ptest (&#039;&#039;package test&#039;&#039;) is a concept for building, installing and running the test suites that are included in many packages.&lt;br /&gt;
&lt;br /&gt;
=Adding ptest to your build=&lt;br /&gt;
&lt;br /&gt;
Ptest is enabled in your build by adding &amp;quot;ptest&amp;quot; to the DISTRO_FEATURES variable. This will cause ptest-enabled packages to build and install ptest files into /usr/lib/&amp;lt;pkgname&amp;gt;/ptest.&lt;br /&gt;
&lt;br /&gt;
=Running ptest=&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;ptest-runner&amp;quot; package installs a &amp;quot;ptest-runner&amp;quot; shell script which loops through all install ptest test suites and runs them in sequence.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5507</id>
		<title>Build Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5507"/>
		<updated>2012-04-19T07:26:47Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to serve as a guide to tweaking your build system and bitbake configuration for optimal build time as well as to provide some guidance on how to collect build metrics and identify bottlenecks.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
&lt;br /&gt;
Some general tips on how to ensure good performance of builds:&lt;br /&gt;
&lt;br /&gt;
* Put the build directory on its own disk. This is good practice in its own right since the build system has a tendency to wear disks heavily.&lt;br /&gt;
* Use the ext4 filesystem for the build disk&lt;br /&gt;
* Turn off journaling for ext4 (&amp;quot;tune2fs -O ^has_journal &amp;lt;disk&amp;gt;&amp;quot;)&lt;br /&gt;
* Mount using the options &amp;quot;noatime,barrier=0,commit=6000&amp;quot;&lt;br /&gt;
* Use a tmpfs for /tmp&lt;br /&gt;
&lt;br /&gt;
== bb-matrix ==&lt;br /&gt;
The bb-matrix.sh script (scripts/contrib/bb-perf) can be used to collect all the relevant metrics of the TIME(1) command for a build. The bb-matrix.sh generates a datfile similar to the following (trimmed for display purposes):&lt;br /&gt;
&lt;br /&gt;
 BB PM %e %S %U %P %c %w %R %F %M&lt;br /&gt;
 04 04 7584.13 3106.60 19818.78 302% 10038479 53837200 2381052920 52972 1857632&lt;br /&gt;
 04 05 7488.93 3143.40 20344.21 313% 10290920 53308215 2380549395 51668 2027232&lt;br /&gt;
 04 06 7524.69 3141.34 20575.58 315% 10287288 53626500 2380333579 51820 2027248&lt;br /&gt;
 04 07 7464.62 3141.47 20741.94 319% 10613016 53459858 2381025909 50929 2027376&lt;br /&gt;
 04 08 7570.45 3151.23 20949.85 318% 10625744 53485726 2382061127 52367 2027232&lt;br /&gt;
 05 04 7479.95 3254.95 20444.40 316% 13858856 50054205 2387500546 53457 2027232&lt;br /&gt;
 05 05 7494.82 3282.37 20643.16 319% 14274000 49852477 2380346993 52289 2027248&lt;br /&gt;
 05 06 7432.55 3277.54 21049.68 327% 14340685 49998524 2380221845 53622 2027376&lt;br /&gt;
 05 07 7377.66 3300.18 21238.96 332% 13926958 50634688 2384699997 53851 1941840&lt;br /&gt;
 05 08 7408.57 3297.64 21306.12 332% 14139864 50330053 2380869210 54169 1912272&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bb-matrix-plot.sh script can then be used to visualize this data, generating images like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3.png]]&lt;br /&gt;
&lt;br /&gt;
== buildstats ==&lt;br /&gt;
If you enable buildstats (by adding &amp;lt;tt&amp;gt;INHERIT += &amp;quot;buildstats&amp;quot;&amp;lt;/tt&amp;gt; to local.conf) you will get detailed build performance log data in tmp/buildstats.&lt;br /&gt;
&lt;br /&gt;
Richard Purdie has [https://lists.yoctoproject.org/pipermail/poky/2011-February/003740.html modified pybootbootchartgui] to parse this data and produce [http://tim.rpsys.net/bootchart.png pretty charts].&lt;br /&gt;
&lt;br /&gt;
== parallelism ==&lt;br /&gt;
Small builds do not scale to a large number of cores, due to package inter-dependencies. Going far beyond 8 is not giving much benefit. Here is a graph of a 64-core machine building core-image-minimal with different build parameters:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3-64.png]]&lt;br /&gt;
&lt;br /&gt;
Bigger builds are less hampered by linear dependency chains, and fill the cores better.&lt;br /&gt;
&lt;br /&gt;
== discussion ==&lt;br /&gt;
Build system performance is a recurring mailing list topic. [http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/010179.html Here] is Richard Purdie discussing the challenges of improving many-core build performance and package dependency issues.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5410</id>
		<title>Build Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5410"/>
		<updated>2012-04-16T13:09:37Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to serve as a guide to tweaking your build system and bitbake configuration for optimal build time as well as to provide some guidance on how to collect build metrics and identify bottlenecks.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
&lt;br /&gt;
Some general tips on how to ensure good performance of builds:&lt;br /&gt;
&lt;br /&gt;
* Put the build directory on its own disk. This is good practice in its own right since the build system has a tendency to wear disks heavily.&lt;br /&gt;
* Use the ext4 filesystem for the build disk&lt;br /&gt;
* Turn off journaling for ext4 (&amp;quot;tune2fs -O ^has_journal &amp;lt;disk&amp;gt;&amp;quot;)&lt;br /&gt;
* Mount using the options &amp;quot;noatime,barrier=0,commit=6000&amp;quot;&lt;br /&gt;
* Use a tmpfs for /tmp&lt;br /&gt;
&lt;br /&gt;
== bb-matrix ==&lt;br /&gt;
The bb-matrix.sh script (scripts/contrib/bb-perf) can be used to collect all the relevant metrics of the TIME(1) command for a build. The bb-matrix.sh generates a datfile similar to the following (trimmed for display purposes):&lt;br /&gt;
&lt;br /&gt;
 BB PM %e %S %U %P %c %w %R %F %M&lt;br /&gt;
 04 04 7584.13 3106.60 19818.78 302% 10038479 53837200 2381052920 52972 1857632&lt;br /&gt;
 04 05 7488.93 3143.40 20344.21 313% 10290920 53308215 2380549395 51668 2027232&lt;br /&gt;
 04 06 7524.69 3141.34 20575.58 315% 10287288 53626500 2380333579 51820 2027248&lt;br /&gt;
 04 07 7464.62 3141.47 20741.94 319% 10613016 53459858 2381025909 50929 2027376&lt;br /&gt;
 04 08 7570.45 3151.23 20949.85 318% 10625744 53485726 2382061127 52367 2027232&lt;br /&gt;
 05 04 7479.95 3254.95 20444.40 316% 13858856 50054205 2387500546 53457 2027232&lt;br /&gt;
 05 05 7494.82 3282.37 20643.16 319% 14274000 49852477 2380346993 52289 2027248&lt;br /&gt;
 05 06 7432.55 3277.54 21049.68 327% 14340685 49998524 2380221845 53622 2027376&lt;br /&gt;
 05 07 7377.66 3300.18 21238.96 332% 13926958 50634688 2384699997 53851 1941840&lt;br /&gt;
 05 08 7408.57 3297.64 21306.12 332% 14139864 50330053 2380869210 54169 1912272&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bb-matrix-plot.sh script can then be used to visualize this data, generating images like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3.png]]&lt;br /&gt;
&lt;br /&gt;
== buildstats ==&lt;br /&gt;
If you enable buildstats (by adding &amp;lt;tt&amp;gt;INHERIT += &amp;quot;buildstats&amp;quot;&amp;lt;/tt&amp;gt; to local.conf) you will get detailed build performance log data in tmp/buildstats.&lt;br /&gt;
&lt;br /&gt;
Richard Purdie has [https://lists.yoctoproject.org/pipermail/poky/2011-February/003740.html modified pybootbootchartgui] to parse this data and produce pretty charts like above.&lt;br /&gt;
&lt;br /&gt;
== parallelism ==&lt;br /&gt;
Small builds do not scale to a large number of cores, due to package inter-dependencies. Going far beyond 8 is not giving much benefit. Here is a graph of a 64-core machine building core-image-minimal with different build parameters:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3-64.png]]&lt;br /&gt;
&lt;br /&gt;
Bigger builds are less hampered by linear dependency chains, and fill the cores better.&lt;br /&gt;
&lt;br /&gt;
== discussion ==&lt;br /&gt;
Build system performance is a recurring mailing list topic. [http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/010179.html Here] is Richard Purdie discussing the challenges of improving many-core build performance and package dependency issues.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5409</id>
		<title>Build Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5409"/>
		<updated>2012-04-16T13:03:22Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to serve as a guide to tweaking your build system and bitbake configuration for optimal build time as well as to provide some guidance on how to collect build metrics and identify bottlenecks.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
&lt;br /&gt;
Some general tips on how to ensure good performance of builds:&lt;br /&gt;
&lt;br /&gt;
* Put the build directory on its own disk. This is good practice in its own right since the build system has a tendency to wear disks heavily.&lt;br /&gt;
* Use the ext4 filesystem for the build disk&lt;br /&gt;
* Turn off journaling for ext4 (&amp;quot;tune2fs -O ^has_journal &amp;lt;disk&amp;gt;&amp;quot;)&lt;br /&gt;
* Mount using the options &amp;quot;noatime,barrier=0,commit=6000&amp;quot;&lt;br /&gt;
* Use a tmpfs for /tmp&lt;br /&gt;
&lt;br /&gt;
== bb-matrix ==&lt;br /&gt;
The bb-matrix.sh script (scripts/contrib/bb-perf) can be used to collect all the relevant metrics of the TIME(1) command for a build. The bb-matrix.sh generates a datfile similar to the following (trimmed for display purposes):&lt;br /&gt;
&lt;br /&gt;
 BB PM %e %S %U %P %c %w %R %F %M&lt;br /&gt;
 04 04 7584.13 3106.60 19818.78 302% 10038479 53837200 2381052920 52972 1857632&lt;br /&gt;
 04 05 7488.93 3143.40 20344.21 313% 10290920 53308215 2380549395 51668 2027232&lt;br /&gt;
 04 06 7524.69 3141.34 20575.58 315% 10287288 53626500 2380333579 51820 2027248&lt;br /&gt;
 04 07 7464.62 3141.47 20741.94 319% 10613016 53459858 2381025909 50929 2027376&lt;br /&gt;
 04 08 7570.45 3151.23 20949.85 318% 10625744 53485726 2382061127 52367 2027232&lt;br /&gt;
 05 04 7479.95 3254.95 20444.40 316% 13858856 50054205 2387500546 53457 2027232&lt;br /&gt;
 05 05 7494.82 3282.37 20643.16 319% 14274000 49852477 2380346993 52289 2027248&lt;br /&gt;
 05 06 7432.55 3277.54 21049.68 327% 14340685 49998524 2380221845 53622 2027376&lt;br /&gt;
 05 07 7377.66 3300.18 21238.96 332% 13926958 50634688 2384699997 53851 1941840&lt;br /&gt;
 05 08 7408.57 3297.64 21306.12 332% 14139864 50330053 2380869210 54169 1912272&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bb-matrix-plot.sh script can then be used to visualize this data, generating images like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3.png]]&lt;br /&gt;
&lt;br /&gt;
== buildstats ==&lt;br /&gt;
If you enable buildstats (by adding &amp;lt;tt&amp;gt;INHERIT += &amp;quot;buildstats&amp;quot;&amp;lt;/tt&amp;gt; to local.conf) you will get detailed build performance log data in tmp/buildstats.&lt;br /&gt;
&lt;br /&gt;
Richard Purdie has [https://lists.yoctoproject.org/pipermail/poky/2011-February/003740.html modified pybootbootchartgui] to parse this data and produce pretty charts like above.&lt;br /&gt;
&lt;br /&gt;
== parallelism ==&lt;br /&gt;
Small builds do not scale to a large number of cores, due to package inter-dependencies. Going far beyond 8 is not giving much benefit. See this graph of different build parameters on a 64-core machine when building core-image-minimal:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3-64.png]]&lt;br /&gt;
&lt;br /&gt;
Bigger builds are less hampered by linear dependency chains, and fill the cores better.&lt;br /&gt;
&lt;br /&gt;
== discussion ==&lt;br /&gt;
Build system performance is a recurring mailing list topic. [http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/010179.html Here] is Richard Purdie discussing the challenges of improving many-core build performance and package dependency issues.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5408</id>
		<title>Build Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5408"/>
		<updated>2012-04-16T13:01:45Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to serve as a guide to tweaking your build system and bitbake configuration for optimal build time as well as to provide some guidance on how to collect build metrics and identify bottlenecks.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
&lt;br /&gt;
Some general tips on how to ensure good performance of builds:&lt;br /&gt;
&lt;br /&gt;
* Put the build directory on its own disk. This is good practice in its own right since the build system has a tendency to wear disks heavily.&lt;br /&gt;
* Use the ext4 filesystem for the build disk&lt;br /&gt;
* Turn off journaling for ext4 (&amp;quot;tune2fs -O ^has_journal &amp;lt;disk&amp;gt;&amp;quot;)&lt;br /&gt;
* Mount using the options &amp;quot;noatime,barrier=0,commit=6000&amp;quot;&lt;br /&gt;
* Use a tmpfs for /tmp&lt;br /&gt;
&lt;br /&gt;
== bb-matrix ==&lt;br /&gt;
The bb-matrix.sh script (scripts/contrib/bb-perf) can be used to collect all the relevant metrics of the TIME(1) command for a build. The bb-matrix.sh generates a datfile similar to the following (trimmed for display purposes):&lt;br /&gt;
&lt;br /&gt;
 BB PM %e %S %U %P %c %w %R %F %M&lt;br /&gt;
 04 04 7584.13 3106.60 19818.78 302% 10038479 53837200 2381052920 52972 1857632&lt;br /&gt;
 04 05 7488.93 3143.40 20344.21 313% 10290920 53308215 2380549395 51668 2027232&lt;br /&gt;
 04 06 7524.69 3141.34 20575.58 315% 10287288 53626500 2380333579 51820 2027248&lt;br /&gt;
 04 07 7464.62 3141.47 20741.94 319% 10613016 53459858 2381025909 50929 2027376&lt;br /&gt;
 04 08 7570.45 3151.23 20949.85 318% 10625744 53485726 2382061127 52367 2027232&lt;br /&gt;
 05 04 7479.95 3254.95 20444.40 316% 13858856 50054205 2387500546 53457 2027232&lt;br /&gt;
 05 05 7494.82 3282.37 20643.16 319% 14274000 49852477 2380346993 52289 2027248&lt;br /&gt;
 05 06 7432.55 3277.54 21049.68 327% 14340685 49998524 2380221845 53622 2027376&lt;br /&gt;
 05 07 7377.66 3300.18 21238.96 332% 13926958 50634688 2384699997 53851 1941840&lt;br /&gt;
 05 08 7408.57 3297.64 21306.12 332% 14139864 50330053 2380869210 54169 1912272&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bb-matrix-plot.sh script can then be used to visualize this data, generating images like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3.png]]&lt;br /&gt;
&lt;br /&gt;
== buildstats ==&lt;br /&gt;
If you enable buildstats (by adding &amp;lt;tt&amp;gt;INHERIT += &amp;quot;buildstats&amp;quot;&amp;lt;/tt&amp;gt; to local.conf) you will get detailed build performance log data in tmp/buildstats.&lt;br /&gt;
&lt;br /&gt;
Richard Purdie has [https://lists.yoctoproject.org/pipermail/poky/2011-February/003740.html modified pybootbootchartgui] to parse this data and produce pretty charts like above.&lt;br /&gt;
&lt;br /&gt;
== parallelism ==&lt;br /&gt;
Small builds do not scale to a large number of cores, due to package inter-dependencies. Going far beyond 8 is not giving much benefit. See this graph of different build parameters on a 64-core machine when building core-image-minimal:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3-64.png]]&lt;br /&gt;
&lt;br /&gt;
== discussion ==&lt;br /&gt;
Build system performance is a recurring mailing list topic. [http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/010179.html Here] is Richard Purdie discussing the challenges of improving many-core build performance and package dependency issues.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5407</id>
		<title>Build Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5407"/>
		<updated>2012-04-16T12:59:46Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to serve as a guide to tweaking your build system and bitbake configuration for optimal build time as well as to provide some guidance on how to collect build metrics and identify bottlenecks.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
&lt;br /&gt;
Some general tips on how to ensure good performance of builds:&lt;br /&gt;
&lt;br /&gt;
* Put the build directory on its own disk. This is good practice in its own right since the build system has a tendency to wear disks heavily.&lt;br /&gt;
* Use the ext4 filesystem for the build disk&lt;br /&gt;
* Turn off journaling for ext4 (&amp;quot;tune2fs -O ^has_journal &amp;lt;disk&amp;gt;&amp;quot;)&lt;br /&gt;
* Mount using the options &amp;quot;noatime,barrier=0,commit=6000&amp;quot;&lt;br /&gt;
* Use a tmpfs for /tmp&lt;br /&gt;
&lt;br /&gt;
== bb-matrix ==&lt;br /&gt;
The bb-matrix.sh script (scripts/contrib/bb-perf) can be used to collect all the relevant metrics of the TIME(1) command for a build. The bb-matrix.sh generates a datfile similar to the following (trimmed for display purposes):&lt;br /&gt;
&lt;br /&gt;
 BB PM %e %S %U %P %c %w %R %F %M&lt;br /&gt;
 04 04 7584.13 3106.60 19818.78 302% 10038479 53837200 2381052920 52972 1857632&lt;br /&gt;
 04 05 7488.93 3143.40 20344.21 313% 10290920 53308215 2380549395 51668 2027232&lt;br /&gt;
 04 06 7524.69 3141.34 20575.58 315% 10287288 53626500 2380333579 51820 2027248&lt;br /&gt;
 04 07 7464.62 3141.47 20741.94 319% 10613016 53459858 2381025909 50929 2027376&lt;br /&gt;
 04 08 7570.45 3151.23 20949.85 318% 10625744 53485726 2382061127 52367 2027232&lt;br /&gt;
 05 04 7479.95 3254.95 20444.40 316% 13858856 50054205 2387500546 53457 2027232&lt;br /&gt;
 05 05 7494.82 3282.37 20643.16 319% 14274000 49852477 2380346993 52289 2027248&lt;br /&gt;
 05 06 7432.55 3277.54 21049.68 327% 14340685 49998524 2380221845 53622 2027376&lt;br /&gt;
 05 07 7377.66 3300.18 21238.96 332% 13926958 50634688 2384699997 53851 1941840&lt;br /&gt;
 05 08 7408.57 3297.64 21306.12 332% 14139864 50330053 2380869210 54169 1912272&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bb-matrix-plot.sh script can then be used to visualize this data, generating images like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3.png]]&lt;br /&gt;
&lt;br /&gt;
== buildstats ==&lt;br /&gt;
If you enable buildstats (by adding &amp;lt;tt&amp;gt;INHERIT += &amp;quot;buildstats&amp;quot;&amp;lt;/tt&amp;gt; to local.conf) you will get detailed build performance log data in tmp/buildstats.&lt;br /&gt;
&lt;br /&gt;
Richard Purdie has [https://lists.yoctoproject.org/pipermail/poky/2011-February/003740.html modified pybootbootchartgui] to parse this data and produce pretty charts like above.&lt;br /&gt;
&lt;br /&gt;
== parallelism ==&lt;br /&gt;
The small builds does not scale to large number of cores, due to package inter-dependencies. Going far beyond 8 is not giving much benefit. See this graph showing the speed difference in using different build parameters on a 64-core machine when building core-image-minimal:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3-64.png]]&lt;br /&gt;
&lt;br /&gt;
== discussion ==&lt;br /&gt;
Build system performance is a recurring mailing list topic. [http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/010179.html Here] is Richard Purdie discussing the challenges of improving many-core build performance and package dependency issues.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=File:Bb-matrix-f3-64.png&amp;diff=5406</id>
		<title>File:Bb-matrix-f3-64.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=File:Bb-matrix-f3-64.png&amp;diff=5406"/>
		<updated>2012-04-16T12:55:48Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: Build parallelism benchmark on 64-core machine&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Build parallelism benchmark on 64-core machine&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5391</id>
		<title>Build Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5391"/>
		<updated>2012-04-13T11:41:25Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to serve as a guide to tweaking your build system and bitbake configuration for optimal build time as well as to provide some guidance on how to collect build metrics and identify bottlenecks.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
&lt;br /&gt;
Some general tips on how to ensure good performance of builds:&lt;br /&gt;
&lt;br /&gt;
* Put the build directory on its own disk. This is good practice in its own right since the build system has a tendency to wear disks heavily.&lt;br /&gt;
* Use the ext4 filesystem for the build disk&lt;br /&gt;
* Turn off journaling for ext4 (&amp;quot;tune2fs -O ^has_journal &amp;lt;disk&amp;gt;&amp;quot;)&lt;br /&gt;
* Mount using the options &amp;quot;noatime,barrier=0,commit=6000&amp;quot;&lt;br /&gt;
* Use a tmpfs for /tmp&lt;br /&gt;
* The build does not scale well to large number of cores, due to package inter-dependencies. Going much beyond 10-12 is not giving much benefit.&lt;br /&gt;
&lt;br /&gt;
== bb-matrix ==&lt;br /&gt;
The bb-matrix.sh script (scripts/contrib/bb-perf) can be used to collect all the relevant metrics of the TIME(1) command for a build. The bb-matrix.sh generates a datfile similar to the following (trimmed for display purposes):&lt;br /&gt;
&lt;br /&gt;
 BB PM %e %S %U %P %c %w %R %F %M&lt;br /&gt;
 04 04 7584.13 3106.60 19818.78 302% 10038479 53837200 2381052920 52972 1857632&lt;br /&gt;
 04 05 7488.93 3143.40 20344.21 313% 10290920 53308215 2380549395 51668 2027232&lt;br /&gt;
 04 06 7524.69 3141.34 20575.58 315% 10287288 53626500 2380333579 51820 2027248&lt;br /&gt;
 04 07 7464.62 3141.47 20741.94 319% 10613016 53459858 2381025909 50929 2027376&lt;br /&gt;
 04 08 7570.45 3151.23 20949.85 318% 10625744 53485726 2382061127 52367 2027232&lt;br /&gt;
 05 04 7479.95 3254.95 20444.40 316% 13858856 50054205 2387500546 53457 2027232&lt;br /&gt;
 05 05 7494.82 3282.37 20643.16 319% 14274000 49852477 2380346993 52289 2027248&lt;br /&gt;
 05 06 7432.55 3277.54 21049.68 327% 14340685 49998524 2380221845 53622 2027376&lt;br /&gt;
 05 07 7377.66 3300.18 21238.96 332% 13926958 50634688 2384699997 53851 1941840&lt;br /&gt;
 05 08 7408.57 3297.64 21306.12 332% 14139864 50330053 2380869210 54169 1912272&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bb-matrix-plot.sh script can then be used to visualize this data, generating images like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3.png]]&lt;br /&gt;
&lt;br /&gt;
== buildstats ==&lt;br /&gt;
If you enable buildstats (by adding &amp;lt;tt&amp;gt;INHERIT += &amp;quot;buildstats&amp;quot;&amp;lt;/tt&amp;gt; to local.conf) you will get detailed build performance log data in tmp/buildstats.&lt;br /&gt;
&lt;br /&gt;
Richard Purdie has [https://lists.yoctoproject.org/pipermail/poky/2011-February/003740.html modified pybootbootchartgui] to parse this data and produce a pretty chart. ([http://tim.rpsys.net/bootchart.png example])&lt;br /&gt;
&lt;br /&gt;
== discussion ==&lt;br /&gt;
Build system performance is a recurring mailing list topic. [http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/010179.html Here] is Richard Purdie discussing the challenges of improving many-core build performance and package dependency issues.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5390</id>
		<title>Build Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Build_Performance&amp;diff=5390"/>
		<updated>2012-04-13T10:34:02Z</updated>

		<summary type="html">&lt;p&gt;BjornStenberg: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is intended to serve as a guide to tweaking your build system and bitbake configuration for optimal build time as well as to provide some guidance on how to collect build metrics and identify bottlenecks.&lt;br /&gt;
&lt;br /&gt;
== General Tips ==&lt;br /&gt;
&lt;br /&gt;
Some general tips on how to ensure good performance of builds:&lt;br /&gt;
&lt;br /&gt;
* Put the build directory on its own disk. This is good practice in its own right since the build system has a tendency to wear disks heavily.&lt;br /&gt;
* Use the ext4 filesystem for the build disk&lt;br /&gt;
* Turn off journaling for ext4 (&amp;quot;tune2fs -O ^has_journal &amp;lt;disk&amp;gt;&amp;quot;)&lt;br /&gt;
* Mount using the options &amp;quot;noatime,barrier=0,commit=6000&amp;quot;&lt;br /&gt;
* Use a tmpfs for /tmp&lt;br /&gt;
* The build does not scale well to large number of cores, due to package inter-dependencies. Going much beyond 10-12 is not giving much benefit.&lt;br /&gt;
&lt;br /&gt;
== bb-matrix ==&lt;br /&gt;
The bb-matrix.sh script (scripts/contrib/bb-perf) can be used to collect all the relevant metrics of the TIME(1) command for a build. The bb-matrix.sh generates a datfile similar to the following (trimmed for display purposes):&lt;br /&gt;
&lt;br /&gt;
 BB PM %e %S %U %P %c %w %R %F %M&lt;br /&gt;
 04 04 7584.13 3106.60 19818.78 302% 10038479 53837200 2381052920 52972 1857632&lt;br /&gt;
 04 05 7488.93 3143.40 20344.21 313% 10290920 53308215 2380549395 51668 2027232&lt;br /&gt;
 04 06 7524.69 3141.34 20575.58 315% 10287288 53626500 2380333579 51820 2027248&lt;br /&gt;
 04 07 7464.62 3141.47 20741.94 319% 10613016 53459858 2381025909 50929 2027376&lt;br /&gt;
 04 08 7570.45 3151.23 20949.85 318% 10625744 53485726 2382061127 52367 2027232&lt;br /&gt;
 05 04 7479.95 3254.95 20444.40 316% 13858856 50054205 2387500546 53457 2027232&lt;br /&gt;
 05 05 7494.82 3282.37 20643.16 319% 14274000 49852477 2380346993 52289 2027248&lt;br /&gt;
 05 06 7432.55 3277.54 21049.68 327% 14340685 49998524 2380221845 53622 2027376&lt;br /&gt;
 05 07 7377.66 3300.18 21238.96 332% 13926958 50634688 2384699997 53851 1941840&lt;br /&gt;
 05 08 7408.57 3297.64 21306.12 332% 14139864 50330053 2380869210 54169 1912272&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bb-matrix-plot.sh script can then be used to visualize this data, generating images like the following:&lt;br /&gt;
&lt;br /&gt;
[[File:Bb-matrix-f3.png]]&lt;br /&gt;
&lt;br /&gt;
== buildstats ==&lt;br /&gt;
If you enable buildstats (by adding &amp;lt;tt&amp;gt;INHERIT += &amp;quot;buildstats&amp;quot;&amp;lt;/tt&amp;gt; to local.conf) you will get detailed build performance log data in tmp/buildstats.&lt;br /&gt;
&lt;br /&gt;
Richard Purdie has [https://lists.yoctoproject.org/pipermail/poky/2011-February/003740.html modified bootchart] to produce pretty charts showing this data graphically. ([http://tim.rpsys.net/bootchart.png example])&lt;br /&gt;
&lt;br /&gt;
== discussion ==&lt;br /&gt;
Build system performance is a recurring mailing list topic. [http://lists.linuxtogo.org/pipermail/openembedded-core/2011-September/010179.html Here] is Richard Purdie discussing the challenges of improving many-core build performance and package dependency issues.&lt;/div&gt;</summary>
		<author><name>BjornStenberg</name></author>
	</entry>
</feed>