aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
AgeCommit message (Collapse)Author
2018-10-29oeqa/selftest: Improvements to the json loggingRichard Purdie
Tweak the preceeding commit to: * Add STARTTIME to the identifier to make it unique * Use LOG_DIR * Store the layer config in a more natural json format * Drop '_' function prefixes Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29oeqa/selftest/context: write testresult to json filesYeoh Ee Peng
As part of the solution to replace Testopia to store testresult, OEQA selftest need to output testresult into json files, where these json testresult files will be stored into git repository by the future test-case-management tools. By default, json testresult file will be written to "oeqa" directory under the oe-selftest log directory. To configure multiple instances of bitbake to write json testresult to a single testresult file at custom directory, user will define the variable "OEQA_JSON_RESULT_DIR" with the custom directory for json testresult. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29oeqa/core/runner: write testresult to json filesYeoh Ee Peng
As part of the solution to replace Testopia to store testresult, OEQA need to output testresult into single json file, where json testresult file will be stored in git repository by the future test-case-management tools. The json testresult file will store more than one set of results, where each set of results was uniquely identified by the result_id. The result_id would be like "runtime-qemux86-core-image-sato", where it was a runtime test with target machine equal to qemux86 and running on core-image-sato image. The json testresult file will only store the latest test content for a given result_id. The json testresult file contains the configuration (eg. COMMIT, BRANCH, MACHINE, IMAGE), result (eg. PASSED, FAILED, ERROR), test log, and result_id. Based on the destination json testresult file directory provided, it could have multiple instances of bitbake trying to write json testresult to a single testresult file, using locking a lockfile alongside the results file directory to prevent races. Also the library class inside this patch will be reused by the future test-case-management tools to write json testresult for manual test case executed. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-21oe-selftest: devtool: Support meta being a symbolic linkPeter Kjellerstedt
oe-selftest's devtool tests have been broken since commit 2457cd57 (oe-selftest: devtool: avoid parallel races by using temporary copy of core) if meta is a symbolic link. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-18oeqa/core/runner: refactor for OEQA to write json testresultYeoh Ee Peng
Refactor the original _getDetailsNotPassed method to return testresult details (test status and log), which will be reused by future OEQA code to write json testresult. Take the opportunity to consolidate and simplify the logic used to gather test status and log within the TestResult instance. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-16sstatetests.py: reset TCLIBCAPPENDKai Kang
It appends TCLIBCAPPEND to TMPDIR in meta/conf/distro/defaultsetup.conf: TMPDIR .= "${TCLIBCAPPEND}" It affects some oe selftest cases in sstatetests.py. Reset TCLIBCAPPEND for these cases. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-12ksample.py: fix error messageChen Qi
The current error message is like: kobject-example.kodoesn't exist Add a space so that it looks like: kobject-example.ko doesn't exist Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-11oeqa/manual/oe-core: Drop image build during taskexp testRichard Purdie
Building an image takes time and isn't necessary to test taskexp, we can drop this step. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-11oeqa/manual: Remove bitbake-selftest executionRichard Purdie
The autobuilder runs bitbake-selftest already so we don't need to execute this manually. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-11oeqa/manual: transfer manual test cases from testopia to oeqaYeoh Ee Peng
As part of the solution to replace Testopia, manual test cases need to be migrated to OEQA. These manual test case json files will serve two use cases. Use case#1: as input to the future commandline-based manual test runner script, where this script will display actions and expected result information in user friendly text, then it will capture user input for test result and log, finally it will write test result and log into existing standardize test result json format from OEQA framework for automated tests. Use case#2: QA will open and read these json file manually for planning manual test execution. Any reader interested in understanding manual test cases will open and read these files. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-11oeqa/runtime/opkg: Ensure the test works on multilibRichard Purdie
After allarch was disabled in multilib, this test broke. Fix the test to account for that change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-09selftest/runqemu: Handle SystemExitRichard Purdie
The sigchld handler in runqemu can raise a SystemExit when qemu shuts down. Rather than backtracing, accept this as a successful test result. ERROR: runqemu.QemuTest.test_qemu_can_shutdown (subunit.RemotedTestCase) testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 183, in test_qemu_can_shutdown qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 175, in _start_qemu_shutdown_check_if_shutdown_succeeded time.sleep(1) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/qemurunner.py", line 100, in handleSIGCHLD raise SystemExit SystemExit Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-09qemurunner: Remove the signal handler before stopping qemuRichard Purdie
The qemu shutdown can race with the signal handler removal leading to confusing tracebacks on slower/loaded systems. Remove the signal handler first before shutting down. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-13oeqa/selftest/recipetool: fix non-determinism in cmake testRoss Burton
The Navit recipe can depend on fribidi which is now part of oe-core. Since the pkgconfig lookup is based on pkgdata the results can change depending on what has been built, which leads to occasional failures. Build gtk+ before the test to ensure that the pkgdata is populated with more of the dependencies, and add fribidi to the generated DEPENDS checklist. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-13oeqa/selftest/runtime_test: Ensure we build/use gnupg-nativeRichard Purdie
Without this, we see errors if gpg is missing from the host system for "oe-selftest -r runtime_test.TestImage.test_testimage_dnf". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-13insane: Recognise BPF as a valid EM_MACHINE typeKhem Raj
BPF Linux ELF objects are generated with kernel-selftests with >= 4.18 kernel and when clang is enabled which packages BPF objects into packages, therefore recongnise this as a valid ELF target Add a selftest for BPF Do not flag BPF objects in target, since they pretty much will be ok for most of kernels architectures we care do support BPF Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-12statetests.py: drop test_sstate_allarch_samesigs_multilibKai Kang
allarch is disabled when multilib is used, so sstate oeqa case test_sstate_allarch_samesigs_multilib is useless. Remove check for allarch part and rename to test_sstate_nativesdk_samesigs_multilib. Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04oeqa/selftest/runtime_test: Fix ↵Richard Purdie
runtime_test.TestImage.test_testimage_install after ssl changes The test installs socat and expects it to run but assumes all its dependencies are already installed (which includes libssl). Recent changes mean this isn't the case so force libssl into the image in advance to work around this issue for now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-30oeqa/runtime/dnf: Make sure test_dnf_install does not skippedYeoh Ee Peng
During debugging dnf issue, we found that the test_dnf_install PASSED the testing even though the environment does not allow dnf install to run successfully. Further debugging had identified that current test_dnf_install will execute dnf install even when the package to be installed already exist, thus dnf install will just skipped and this test will PASSED even though it was not. To solve this, added additional logic to check if the package to be installed already exist, if yes then remove the package before actually run dnf install. This will make sure dnf install was tested as expected. Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-30oeqa/sdk: fixes related to hasPackage semanticsChen Qi
The current _hasPackage does a regex match when checking for the existence of packages. This will sometimes result in unexpected result. For example, the condition hasTargetPackage('gcc') is likely to be always true as it matches libgcc1. For most of the time, we should do exact match instead of regex match. So change _hasPackage function to do that. For the current sdk test cases, the only place that needs regex match is '^gcc-'. This is because there's no easy way to get multilib tune arch (e.g. i686) from testdata.json file. Besides, packagegroup-cross-canadian-xxx and gcc-xxx should be check in host manifest instead of the target one. So fix to use hasHostPackage. Also, as we are doing exact match, there's no need to use r'gtk\+3', just 'gtk+3' is enough. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-30sdk/buldgalculator.py: check against multilib for gtk+3Chen Qi
When determining whether to skip the test case, the check should be done with consideration of multilib. Otherwise, we will meet the following error when testing against lib32 environment. No package 'gtk+-3.0' found Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-30sdk/context.py: add ability to check for multilib version of target packageChen Qi
Add a named argument 'multilib' for the hasTargetPackage function. Its default value is False. When setting to True, it will try to get the correct multilib prefix from the sdk_env, the environment setup script. We need this because we don't want unexpected run of some sdk test cases. The following steps will generate error. 1. Enable multilib for qemux86-64 require conf/multilib.conf MULTILIBS ?= "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 ?= "core2-32" 2. bitbake core-image-sato -c populate_sdk 3. bitbake core-image-sato -c testsdk The error message is like below. No package 'gtk+-3.0' found RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: FAILED As we don't have lib32-gtk+3 installed, the test case should be skipped when testing against the lib32 environment setup script. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-30lib/oe/package_manager: turn postinst failure warnings into bitbake failuresAlexander Kanavin
Sumo release provides a transition period so that deferrals to first boot via 'exit 1' can be converted to pkg_postinst_ontarget(). For the next release however, postinst script failures should be treated as such. [YOCTO #12607] Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-28selftest/package: Add package separated debug symbols hardlink testHongxu Jia
Tweak recipe selftest-hardlink - addition of libexecdir to simulate multiple directories - add gdb.sh to run gdb from script which is invoked at test time. - rename `hello' -> `hello1' to workaround name confliction with the one in lmbench Add test_gdb_hardlink_debug to selftest/package - run a qemu and invoke gdb.sh to gdb binaries of selftest-hardlink - check gdb to read symbols from separated debug hardlink file - check debug symbols works correctly [Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory'] 2018-08-26 01:27:30,195 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests) 2018-08-26 01:30:29,005 - oe-selftest - INFO - gdbtest /usr/bin/hello1 2018-08-26 01:30:36,539 - oe-selftest - INFO - gdbtest /usr/bin/hello2 2018-08-26 01:30:43,568 - oe-selftest - INFO - gdbtest /usr/libexec/hello3 2018-08-26 01:30:50,157 - oe-selftest - ERROR - No debugging symbols found. GDB result: Reading symbols from /usr/libexec/hello3...(no debugging symbols found)...done.^M (gdb) Function "main" not defined.^M Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]^M (gdb) Starting program: /usr/libexec/hello3 ^M Hello World!^M [Inferior 1 (process 320) exited normally]^M (gdb) The program is not being run.^M (gdb) 2018-08-26 01:30:51,180 - oe-selftest - INFO - ... FAIL 2018-08-26 01:30:51,181 - oe-selftest - INFO - Traceback (most recent call last): File "oe-core/meta/lib/oeqa/selftest/cases/package.py", line 148, in test_gdb_hardlink_debug self.fail('GDB %s failed' % binary) AssertionError: GDB /usr/libexec/hello3 failed [Test without commit `package.bbclass: only one hardlink of separated debug info file in each directory'] [Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory'] 2018-08-26 12:40:30,976 - oe-selftest - INFO - test_gdb_hardlink_debug (package.PackageTests) 2018-08-26 12:42:15,149 - oe-selftest - INFO - gdbtest /usr/bin/hello1 2018-08-26 12:42:24,064 - oe-selftest - INFO - gdbtest /usr/bin/hello2 2018-08-26 12:42:31,078 - oe-selftest - INFO - gdbtest /usr/libexec/hello3 2018-08-26 12:42:38,646 - oe-selftest - INFO - gdbtest /usr/libexec/hello4 2018-08-26 12:42:46,824 - oe-selftest - INFO - ... ok [Test with commit `package.bbclass: only one hardlink of separated debug info file in each directory'] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oeqa/core/decorator: add skipIfInDataVarRichard Leitner
skipIfInDataVar will skip a test if a value is in a certain variable. Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oeqa/runtime/ldd: Clean up testRichard Purdie
* Merge the two tests together as having them separate is pointless * Test that ldd runs correctly * Add in a dependency on the "ldd" package being installed instead of the sdk tools feature Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oeqa/runner: Print any errors/failures earlyRichard Purdie
Its a pain to have to wait until oe-selftest finishes to see the failures for example. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oeqa/runner: Use the proper logger functions instead of print()Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oeqa/context: Only set buffer mode for non-concurrent testsRichard Purdie
Periodically we'd see: NOTE: core-image-sato-1.0-r0 do_testsdk: ====================================================================== NOTE: core-image-sato-1.0-r0 do_testsdk: ERROR: broken-runner NOTE: core-image-sato-1.0-r0 do_testsdk: ---------------------------------------------------------------------- NOTE: core-image-sato-1.0-r0 do_testsdk: testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/lib/oeqa/core/utils/concurrencytest.py", line 122, in _run_test test.run(process_result) File "/usr/lib/python3.6/site-packages/subunit/__init__.py", line 1194, in run protocol = TestProtocolServer(result, self._passthrough, self._forward) File "/usr/lib/python3.6/site-packages/subunit/__init__.py", line 514, in __init__ stream = stream.buffer AttributeError: '_io.StringIO' object has no attribute 'buffer' which seems to occur if a result arrives before all the runner threads have started. The runner's result handling changes sys.stdout to a buffer temporarily which can be seen in other threads and it can sometimes fail. Since the tests are running in a separate process we don't need this buffer handling in the concurrent case so only set when not parallelising. The concurrent class handle setting buffer mode internally. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-23oeqa/concurrencytest: Ensure subunit streams are flushed at exitRichard Purdie
Without this, error output such as that in the teardown can be lost and processes may recieve signals they're not expecting causing other strange errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21assimp.py: fix AttributeError in tearDownClassChen Qi
When running this test case, we will see the following error. AttributeError: type object 'BuildAssimp' has no attribute 'project' assimp.py test case does not make use of SDKBuildProject, so remove the import statement and the tearDownClass. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-19kernel-devsrc: restructure for out of tree (and on target) module buildsBruce Ashfield
The existing kernel-devsrc package starts with a full copy of the kernel source and then starts to strip out elements that are not required. This results in extra time (I/O) and extra space being taken up in the final package. The main purpose of the kernel-devsrc package has been to build modules against the running kernel, not to include a full copy of the source code for re-building the kernel. The end result was a 600M kernel-devsrc package. This restructuring of the package uses an approach similar to other distros, where the kernel-devsrc package is for building against the running kernel and uses a curated set of copied infrastructure, versus a mass copy of the entire kernel. The differences in this approach versus other is largely due to the architecture support and the split build/source directory of the kernel. The result is a kernel-devsrc package of about 10M, which is capable of running "make scripts" and compiling kernel modules against the running kernel. Along with the changes to the copying of the infrascture, we also have the following changes: - a better/more explicit listing of dependencies for on-target builds of "make scripts" or "make modules_prepare" - The kernel source is installed into /lib/modules/<version>/build and a symlink created from /usr/src/kernel to the new location. This aligns with the standard location for module support code - There is also a symlink from /lib/modules/<version>/source -> build to reserve a spot for a new package that is simply the kernel source. That package is not part of this update. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16runtime selftest: limit kernel hw bp archesHongzhi.Song
1. So far, only qemux86[-64] support hw breakpoint, no matter whether or not with kvm. qemuppc: The oe-core configuration uses a PPC G4 system as the default cpu but qemu doesn't simulate the hw breakpoint register for G4. qemuarm: The arch more than v7 supports hw breakpoint, however arm use v5 as default. qemuarm64: We temporarily drop qemuarm64 for the moment. Normally it will print debug info once, but endlessly when we trigger the break point. Now it is hard to located the issue, but we will confirm it later. qemumips*: Kernel dosen't support hw bp for mips. 2. Syslog maybe not started, so we use dmesg to confirm. 3. Running 'ls' to trigger the hardware breakpoint test. Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-16runtime selftest: test_trace_events_sample of ksample.pyHongzhi.Song
The debug info can not be written to trace buffer immediately by thread. So we should sleep some seconds. Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15selftest/package: Improve test to cover sparseness and hardlinking from sstateRichard Purdie
The sparseness test was sometimes working and sometimes failing depending on whether sstate was valid. This adds an explict test of sstate to the test for both hardlinking and sparseness. Tweak the test name to cover the fact its tests sparseness too. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15selftest: Replace bitbake -p with bitbake -eRichard Purdie
Parsing all the recipes is annoying when trying to re-execute oe-selftest and also unnecessary as its really just a sanity check. When the tests were originally being developed the guard was useful but less so now. Replace it with bitbake -e which is fast and checks the basic configuration is valid. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15package_manager/sdk: Use filtered copies of the deploy ipk/deb directoriesRichard Purdie
Similar to rpm, use copies of the ipk/deb directories for rootfs construction. This means the image creation code can no longer "see" recipes wich aren't in its dependency chain which is good for a variety of reasons including determinism, incompatible recipe (e.g. systemd/sysvinit) package conflicts and locking performance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-15selftest/package: Add test to ensure sparse files are preservedRichard Purdie
Add a new element to the hardlink test to check we also preseve file sparseness during the packing process. This should ensure we don't regress this issue again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14parselogs.py: output correct log locationChen Qi
The log entry in results is altered to remove 'target_logs'. This causes wrong log location in output. e.g. AssertionError: 1 != 0 : Log: /path/to/image/1.0-r0/postinstall.log But when user wants to check the log, the user will find the log is not present. The actual log file is /path/to/image/1.0-r0/target_logs/postinstall.log. So fix to use the correct log location. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14oeqa/esdk/devtool: Drop OETestDepends usageRichard Purdie
OETestDepends doesn't work with parallelism and in this case we don't really need this dependency, it would just short out some tests quickly in the rare case the esdk environment was broken. Currently this is masking tests which is a much worse problem and we can't make OETestDepends work reliably with parallelism so drop the dependencies. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-10oeqa/sdk/buildgalculator: check for nativesdk-gettext-devRoss Burton
We don't need target gettext to build, but nativesdk-gettext-dev (for nls.m4). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-08context.py: Do not mask exceptions needlessly.Paulo Neves
There were a lot of assumptions in the controller import code of context.py which were not true anymore. These assumptions reflected themselves by catching exceptions and re-raising them with unhelpful error messages in other parts of the code. This commit does not fix the classes controller classes that became broken after the refactor but at least it allows for the exceptions to be thrown where the imports fail, thus actually showing what exactly went wrong with the import. An example of such an improvement is that before if the controller class failed during it's init contructor the controller would just be skipped and the task would just complain it could not find the controller. Now for example, if there is a NamerError due to a variable not being declared, the user will get that report. Signed-off-by: Paulo Neves <ptsneves@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-08-08oe_syslog.py: fix for syslog-ngChen Qi
When using syslog-ng as the syslog provider, oe_syslog test case fails because it cannot find the syslog daemon. This is because it greps for 'syslogd' but syslog-ng's daemon is 'syslog-ng'. So fix it to check both 'syslogd' and 'syslog-ng'. Also, when the test case fails, what I get is: | AssertionError: 1 != 0 : No syslogd process; ps output: <empty here> This does not help user. The output is actually from the 'PS | GREP' command. And when the 'PS | GREP' command fails, the output is always empty. So also fix this problem. After the change, it looks like: | AssertionError: False is not true : No syslog daemon process; ps output: | PID USER VSZ STAT COMMAND | 1 root 16476 S {systemd} /sbin/init | 2 root 0 SW [kthreadd] | 3 root 0 IW [kworker/0:0] ... Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-07selftest/package: Fix hardlink test when using sstateRichard Purdie
The build target won't cause the package task to run if things were already built and in sstate. Ensure we run the package task explicitly to ensure the test works as intended. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-07oeqa/sdk: add test that CMake worksRoss Burton
Add a new SDK testcase that builds assimp, a project that uses cmake. Using TARGET_ARCH and TARGET_OS which is now exported into the environment, check that the generated binaries match the ELF headers we expect. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-31oe-selftest: devtool: avoid parallel races by using temporary copy of corePaul Eggleton
Some of the devtool tests make changes to files under meta/ - legitimately since we want these tests to be working with real recipes and associated files. Unfortunately with the new oe-selftest parallelisation this can break other tests if files go missing at the wrong time (among other scenarios). To avoid this issue, simply take a copy of the core repository and use that for these tests. (We copy the entire repository since changing the path of meta/ influences COREBASE and thus we need to have things like scripts/ alongside as well). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-07-31systemd.py: increase default bus timeoutChen Qi
Use SYSTEMD_BUS_TIMEOUT to set default timeout to 240s to avoid timeout problem on slow qemu machines. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2018-07-31parselogs.py: ignore network interface name changing failureChen Qi
The following error from systemd-udevd is not harmful. It's just because our qemu targets are using eth0. Error changing net interface name 'eth0' to 'enp0s3': Device or resource busy Note that systemd is using a different network interface naming scheme from traditional ethX naming scheme. To make this error message go away, we could symlink /etc/udev/rules.d/80-net-setup-link.rules to /dev/null to recover traditional naming scheme. But I'm not sure if this will cause regression in user experience for systemd users of OE. So just ignore this error message so that parselogs.py test case does not fail. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2018-07-31oe_syslog.py: fix settings in OEHasPackage decoratorChen Qi
1. For test_syslog_running, we should not restrict it to run for only busybox-syslog and sysklogd. So extend it to all syslog providers in oe-core and meta-openembedded. 2. For test_syslog_startup_config, fix to make it depend on the existence of busybox-syslog. The previous condition "!sysklogd && busybox" is incorrect, because busybox may be compiled without syslog support, and sysklogd and busybox-syslog conflict with each other. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
2018-07-31oeqa/selftest: Add package hardlink testRichard Purdie
We keep breaking the preservation of hardlinks during the packaging process. Add a selftest which tests this to try and prevent this breaking again. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>