summaryrefslogtreecommitdiffstats
path: root/support
Commit message (Collapse)AuthorAgeFilesLines
* testing/tests/package: add basic unit test for IPythonAndrey Smirnov2017-07-221-0/+38
| | | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> [Thomas: update .gitlab-ci.yml.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* testing/tests/package/test_python: allow to change timeoutAndrey Smirnov2017-07-221-8/+8
| | | | | | | | | Depending on Python implementation used for testing, time it takes to perform a given test can vary pretty significantly. To accout for that allow individual test functions to specify different timeout value. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* testing/tests/package/test_python: do not hardcode interpreter nameAndrey Smirnov2017-07-221-4/+6
| | | | | | | | | | In order to be able to leverage the same test code for testing different python interpreters (or wrappers around CPython) allow child classes of TestPythonBase to override the name of the executable used to run tests. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* testing/tests/package/test_python: add TestPython3Andrey Smirnov2017-07-221-2/+15
| | | | | | | | | | | | Add Python3 version of TestPython2 to make sure both versions of Python get unit-tested. Modify the code of libc_time_test() to support that change (convert the code to use Python3-style "print"). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> [Thomas: update .gitlab-ci.yml.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* testing/tests/package/test_python: refactor TestPythonBaseAndrey Smirnov2017-07-221-4/+19
| | | | | | | | | | | | | | | | Convert TestPythonBase to a true base class that only provides code implementing various tests without defining tests themselves in a "discoverable" form. To retain correct testing functionality, add TestPython2 derived class that uses code from TestPythonBase to define actual runnable test. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> [Thomas: fix typo in commit log, update .gitlab-ci.yml, both pointed by Ricardo.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* testing/infra/emulator: allow to specify pexpect timeoutAndrey Smirnov2017-07-221-3/+3
| | | | | | | | | | | Some commands take more than 5 seconds to complete under QEMU, so add provisions to allow individual unit-test to specify different duration to avoid false negative test failures. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/fix-rpath: typo fix and unneeded "; " removedWolfgang Grandegger2017-07-221-2/+2
| | | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts/fix-rpath: check if the patchelf utility is executableWolfgang Grandegger2017-07-221-0/+8
| | | | | | Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* minimal.config: add BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=yArnout Vandecappelle2017-07-211-0/+1
| | | | | | | | The user shouldn't need to pass this manually when creating a test-pkg config file. It's an absolutely harmless option to enable always. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* minimal.config: add BR2_COMPILER_PARANOID_UNSAFE_PATH=yArnout Vandecappelle2017-07-211-0/+1
| | | | | | | We really want test-pkg to do the test with a paranoid unsafe path. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/test-pkg: move minimal.config into a separate fileArnout Vandecappelle2017-07-211-0/+6
| | | | | | | | | This minimal configuration is also very useful outside test-pkg. In addition, it will simplify the config merge in a later patch. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: add fix-rpath script to sanitize the rpathSamuel Martin2017-07-201-0/+133
| | | | | | | | | | | | This commit introduces the script "fix-rpath" able to scan a tree, detect ELF files, check their RPATH and fix it in a proper way. The RPATH fixup is done by the patchelf utility using the option "--make-rpath-relative <root-directory>". Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: relocate-sdk.sh now uses a normal pipe to find stringsWolfgang Grandegger2017-07-201-2/+2
| | | | | | | | The normal shell does not support the bashism "< <(...)". Therefore we use a normal pipe to find files containing a specific string. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: relocate-sdk.sh now creates sdk-location in share/buildrootWolfgang Grandegger2017-07-201-1/+1
| | | | | | | | This is because $(HOST_DIR)/usr is gone. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/tests: allow properly indented config fragmentYann E. MORIN2017-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | Currently, defining a config fragment in the runtime test infra requires that the fragment not to be indented. This is beark, and causes grievance when looking at the code (e.g. to fix it). Just strip out all leading spaces/tabs when writing the configuration lines into the config file, allowing in-line indented config fragments, like so: class TestFoo(bla): config = bla.config + \ """ FOO=y # BAR is not set """ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/tests: fix ext4 runtime testYann E. MORIN2017-07-141-1/+1
| | | | | | | | | | | | The current test fails because of a legacy option, renamed during the recent ext overhaul. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Sébastien Szymanski <sebastien.szymanski@armadeus.com> Cc: Samuel Martin <s.martin49@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: unbreak run-tests -lArnout Vandecappelle2017-07-101-1/+1
| | | | | | | | | | | | | | | | | | | In commit b78b50465c20c1733753a8dd47945cf80c9155f8, the initialisation of BRTest.builddir was moved to the __init__ function. However, it is set based on BRTest.outputdir and that is only set when the -o argument is given to run-tests. When called as "run-tests -l", there is no -o argument so BRTest.outputdir remains unset. To fix, keep BRTest.builddir at None when BRTest.outputdir is None. While we're at it, drop the direct access to the class member. If a subclass wishes to set outputdir to something else before calling BRTest.__init__, they are free to do so. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reported-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: move BRTest initialisation to __init__Arnout Vandecappelle2017-07-101-4/+7
| | | | | | | | | | | | BRTest's setUp() method contains a few assignments that initialize its member variables. Since we will want to use these in test case overrides, move them to the __init__ function. Also allow the config member to be overridden, rather than always taking the class member. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: strip /usr/ part from HOST_DIRArnout Vandecappelle2017-07-101-2/+2
| | | | | Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: add exception for nvidia-tegra23.mkThomas Petazzoni2017-07-061-0/+1
| | | | | | | This file is not a package per-se, it includes other .mk files that are packages. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: take into account waf packagesThomas Petazzoni2017-07-061-0/+12
| | | | | | | The waf package infrastructure was not known by the pkg-stats script, so let's add it. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-stats: allow to sort by columnRicardo Martincoski2017-07-061-1/+12
| | | | | | | | | | | | | | | | | | | | With 2000+ packages it's not trivial to identify i.e.: - all packages that don't have a hash file; - all packages that have patches; - all packages that have code style warnings; User experience can be improved by dynamically sorting the resulting table. There is an open-source solution that does that in the client-side and requires minimal changes to our script: sorttable.js. The script is MIT licensed as stated in its website. Also add a hint to the user that the table can be sorted. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-host-rpath: no longer allow $(HOST_DIR)/usrArnout Vandecappelle2017-07-051-3/+1
| | | | | | | | | | Now all packages have been updated to install things in $(HOST_DIR)/lib instead of $(HOST_DIR)/usr/lib, there should no longer be any reason to have $(HOST_DIR)/usr/lib in the RPATH, so we don't allow it any more. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: remove references to host/usrArnout Vandecappelle2017-07-053-3/+3
| | | | | | | The tools are now installed in host/bin instead of host/usr/bin. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* legal-info: add hash for our own license fileYann E. MORIN2017-07-051-0/+2
| | | | | | | | | | | | This silences the annoying warning that there is no hash file for our own COPYING file. Also change the message so that it is more obvious what we're doing. Reported-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* eclipse-register-toolchain: toolchain is no longer installed in $(HOST_DIR)/usrArnout Vandecappelle2017-07-051-1/+1
| | | | | Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/binArnout Vandecappelle2017-07-054-4/+4
| | | | | | | | | | | Since things are no longer installed in $(HOST_DIR)/usr, the callers should also not refer to it. This is a mechanical change with git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g' Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: add tests for musl and uclibc toolchainsThomas Petazzoni2017-07-051-0/+75
| | | | | | | | | | | | | | These tests simply build a system with musl and uclibc toolchains, and boot them under qemu. It allows to minimally validate that our support for musl/uclibc external toolchains is working. We already had some tests covering glibc toolchains, so we can now easily test that all three C libraries are supported. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> --- This commit is part of the series, as I've written/used those tests to validate that things are still working correctly with all of glibc, uclibc and musl toolchains.
* pkg-cmake: programs are now installed in $(HOST_DIR)/binArnout Vandecappelle2017-07-051-1/+1
| | | | | | | | | | Remove the redundant usr/ component of the HOST_DIR paths. Since a previous commit added a symlink from $(HOST_DIR)/usr to $(HOST_DIR), everything keeps on working. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-cmake: move configuration files out of $(HOST_DIR)/usrArnout Vandecappelle2017-07-051-2/+2
| | | | | | | | | | | Move toolchainfile.cmake and Buildroot.cmake from $(HOST_DIR)/usr/share/buildroot to $(HOST_DIR)/share/buildroot. Build-tested with a bunch of cmake packages. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* check-host-rpath: no longer check $(HOST_DIR)/usr/{bin, sbin}Arnout Vandecappelle2017-07-051-2/+2
| | | | | | | | | | Since $(HOST_DIR)/usr/{bin,sbin} are now symlinks to $(HOST_DIR)/{bin,sbin}, it makes no sense to check them - they are already covered. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Move $(HOST_DIR)/usr/lib to $(HOST_DIR)/libArnout Vandecappelle2017-07-051-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a step towards eliminating $(HOST_DIR)/usr. It allows us to convert all packages installing things into $(HOST_DIR)/usr/lib without affecting the rest. To allow compatibility with packages that still use $(HOST_DIR)/usr as the prefix, create a symlink from usr/lib to ../lib. Note that the symlink creation will break when $(HOST_DIR)/usr/lib already exists as a directory, i.e. when rebuilding in an existing output directory. This is necessary: if we don't break it now, the following commits (which remove the usr part from various variables) _will_ break it. At the same time as creating this symlink, we also have to update the check-host-rpath script to accept both $(HOST_DIR)/usr/lib and $(HOST_DIR)/lib, because depending on how the package derives the path, it may be different. Since there are some dependency chains that involve $(STAGING_DIR), $(STAGING_DIR) may in fact be created before $(HOST_DIR). Since $(STAGING_DIR) is a subdirectory of $(HOST_DIR), it is possible that the newly added rule for $(HOST_DIR) never triggers. To make sure that the rule does trigger, add an order-only dependency from $(STAGING_DIR) to $(HOST_DIR). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: add relocate-sdk.sh script for SDK relocationWolfgang Grandegger2017-07-041-0/+47
| | | | | | | | | | | | | | | | | It will install the script "relocate-sdk.sh" in the HOST_DIR allowing to adjust the path to the SDK directory in all text files after it has been moved to a new location. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> [Thomas: - Fix shebang to be /bin/sh instead of /bin/bash, suggested by Arnout - Use | instead of \ as a separator for sed expressions, suggested by Arnout, discussed with Wolfgang and others - Remove ./ at the beginning of LOCFILE, suggested by Arnout - Fix comment about the path check being made before doing the replacement, suggested by Arnout - Fix indentation, suggested by Arnout.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* setlocalversion: fix detection of hg revision for untagged versionsThomas De Schampheleire2017-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, cut prints the entire line if the specified delimiter is not present at all: $ printf "foo bar" | cut -d' ' -f2 bar $ printf "foobar" | cut -d' ' -f2 foobar In setlocalversion, cut is presented with the output of 'hg id' which has the format: "<revision> <tags-if-any>" If the current revision is not tagged, the output of 'hg id' does not contain the delimiter (space), cut prints the entire string, and setlocalversion thinks the version is the tag. As setlocalversion does not print anything for tagged versions, there is no output overall, and no correct indication of the mercurial revision. Fix by passing the extra cut option '--only-delimited', which suppresses output if no delimiter is found. This problem likely went unnoticed for so long, because the tag 'tip' (i.e. most recent revision of the branch) is treated specially: in this case the mercurial revision _is_ printed, i.e. the situation is treated as 'untagged'. The problem is only seen when you are _not_ at the most recent revision in your branch. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support: add Dockerfile for CIArnout Vandecappelle2017-07-021-0/+30
| | | | | | | | | | | | For Gitlab-CI, we want to avoid re-generating the minimal install to be able to run tests all the time. So let's create a docker image that we can post on Docker Hub and then pull. For the time being, this is just what we need for running our CI. Later we can produce something that is also useful for users. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: check-host-rpath now handles $ORIGIN as wellWolfgang Grandegger2017-07-021-1/+1
| | | | | | | | | | | "$ORIGIN/../../usr/lib" is also a valid RPATH for binaries in "$hostdir/usr/bin". After RPATH sanitation, all RPATH directories start with "$ORIGIN". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: rename to 'utils'Thomas Petazzoni2017-07-011-1/+1
| | | | | | | | | | | After some discussion, we found out that "tools" has the four first letters identical to the "toolchain" subfolder, which makes it a bit unpractical with tab-completion. So, this commit renames "tools" to "utils", which is more tab-completion-friendly. This has been discussed with Arnout and Yann. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move scanpypi out of support/scripts/Yann E. MORIN2017-07-011-653/+0
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Yegor Yefremov <yegorslists@googlemail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move scancpan out of support/scripts/Yann E. MORIN2017-07-011-858/+0
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: "François Perrad" <francois.perrad@gadz.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move size-stat-compare out of support/scripts/Yann E. MORIN2017-07-011-127/+0
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move check-package out of support/scripts/Yann E. MORIN2017-07-0110-785/+1
| | | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move get-developers out of support/scripts/Yann E. MORIN2017-07-012-283/+0
| | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* tools: move test-pkg out of support/scriptsYann E. MORIN2017-07-011-197/+0
| | | | | | | | | | Move it to the top-level tools/ directory, so that it is easier to find for users. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: large timeout for login promptRicardo Martincoski2017-07-011-1/+3
| | | | | | | | | | | When running multiple instances of emulator in parallel, the login prompt can take some time to appear. Use a large timeout when waiting for the prompt to avoid random failures. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: run testcases in parallelRicardo Martincoski2017-07-012-1/+18
| | | | | | | | | | | | | | | | | | | Let the user to pass -t to set the number of testcases to run simultaneously. When -j is not specified, calculate it to split the available cores between the simultaneous testcases. Example of auto calculated -j for cpu_count 8: -t -j total 1 9 9 2 4 8 3 3 9 4 2 8 >=5 1 t Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: allow to set BR2_JLEVELRicardo Martincoski2017-07-012-1/+15
| | | | | | | Let the user to override the default BR2_JLEVEL used for each testcase. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: fix code style in emulatorRicardo Martincoski2017-07-011-1/+1
| | | | | | | | Remove unused import. Use 2 empty lines before a class. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: use pexpect.expect directlyRicardo Martincoski2017-07-011-22/+13
| | | | | | | | When using pexpect there is no need for a helper function. Just use expect() directly everywhere. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: use pexpect.sendline directlyRicardo Martincoski2017-07-011-7/+4
| | | | | | | | When using pexpect there is no need for a helper function. Just use sendline() directly everywhere. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/testing: let pexpect write stdout to logRicardo Martincoski2017-07-011-1/+2
| | | | | | | | | | | | | | | When the parameter logfile is passed to spawn(), pexpect sends both stdin and stdout to the logfile and it creates a double echo effect. One way to avoid the double echo in the logfile would be to disable the echo on the terminal just after login ("stty -echo"), but double echo of user and password would remain. Instead of that, send only the stdout to the logfile using the logfile_read property. Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud