summaryrefslogtreecommitdiff
path: root/meta/lib
AgeCommit message (Collapse)AuthorFiles
2017-01-31oeqa/sdk: Updates sanity tests for minimal eSDKFrancisco Pedraza3
Updates sanity tests to cope with minimal eSDK installer 1. Skips the validation of sanity if packagegroup-cross-canadian is in host package. 2. Skips if SDK does not include toolchain at cases/devtool.py This should fix [YOCTO #10794] Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31selftest: wic: fix test_iso_image test caseEd Bartosh1
Added "iso" to IMAGE_FSTYPES to build iso artifacts required to fix test of isoimage-isohybrid wic plugin. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31selftest: stop using hddimg in the wic test suiteEd Bartosh1
Removed hddimg from IMAGE_FEATURES as wic code doesn't use hddimg anymore. [YOCTO #10835] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31wic: Look for image artifacts in a common locationTom Zanussi1
Rather than have each image type look for artifacts in image-specific locations, move towards having them look for artifacts in a common location, in this case DEPLOY_DIR_IMAGE Use the existing deploy.bbclass to have the bootloaders put their binaries in DEPLOY_DIR_IMAGE and then wic will find them and place them in the image Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2017-01-31image-wic: remove HDDDIR from WICVARSEd Bartosh1
Removed HDDDIR as it's not used by wic anymore. Stopped usage of HDDDIR in wic test suite. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31wic: use INITRD_LIVE in isoimage-isohybridEd Bartosh1
INITRD variable is not set if hddimg is disabled. isoimage-isohybrid can't get correct name for initrd if INITRD variable is not set. Added INITRD_LIVE to WICVARS and used it in isoimage-isohybrid code to get initrd artifact name. Used INITRD if INITRD_LIVE is not set. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31selftest: check results in test_image_vars_dir*Ed Bartosh1
Tested that result images are produced in test_image_vars_dir_long and test_image_vars_dir_short test cases. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31selftest: split wic tests casesEd Bartosh1
Split tests to run wic only once per test case. This should fix failures caused by result images left from the previous wic run. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2017-01-31wic: change location of .env filesEd Bartosh1
Current location of .env files $STAGING_DIR/imagedata. It doesn't depend on machine and be rewritten by the builds for different machines. Changed location to $STAGING_DIR/$MACHINE/imagedata to avoid .env files to be rewritten. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-31selftest: wic: test default output directoryEd Bartosh1
As tests now explicitly specify output directory we don't need test_alternate_output_dir test case. However, we need to test wic output to default output location. Removed test_alternate_output_dir test case. Added test_default_output_dir test case. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31selftest: wic: explicitly specify output directoryEd Bartosh1
wic started to use current directory as a default output dir. Specified output directory in wic command line to make tests more predictable and easier to maintain. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-28selftest: wic: split test_debug test caseEd Bartosh1
Splitted to test_debug_short and test_debug_long to make each of the test cases to run wic once. This is consistent with the rest of the test cases and ensures that test cases are set up properly. This also fixes the following test failure caused by the image left from the first wic run: FAIL: test_debug (oeqa.selftest.wic.Wic) Test debug ---------------------------------------------------------------------- Traceback (most recent call last): File "meta/lib/oeqa/utils/decorators.py", line 109, in wrapped_f return func(*args, **kwargs) File "meta/lib/oeqa/selftest/wic.py", line 270, in test_debug self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) AssertionError: 1 != 2 Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26selftest: sstatetests: skip glibc-initial tests in case of non-glibc distroLeonardo Sandoval2
Some distros uses non-glibc so skip those tests requiring glibc-initial as target Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-26selftest/imagefeatures: skip weston test if required features are not presentLeonardo Sandoval1
Also, remove hard-coded features because the image already contains them. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23classes/oeqa: Replace subprocess.check_call() with check_output()Richard Purdie4
If you use subprocess.check_output() the traceback will contain the output when the command fails which is very useful for debugging. There is no good reason not to use this everywhere. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/selftest: Adds test case for sdk-update eSDKFrancisco Pedraza1
1. Test case adds perl recipe before build eSDK. 2. After this added recipe, the script verifies the update: ${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh oe-publish-sdk [esdk] [path-to-http] CORE_IMAGE_EXTRA_INSTALL = "perl" bitbake -c populate-sdk-ext [some-image] devtool sdk-update This should fix [YOCTO #9369] Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23package_manager: default to have scriptlet output captured in logChen Qi1
We need to have scriptlet output captured in log. If we don't do so, some useful information from scriptlets (especially postinstall script) would be missing. In case a script has a warning message but it does not necessarily have to fail, the message should be captured. Opkg has already done that. Change for rpm and dpkg so that scriptlet output is captured and no warning message is missing. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: store measurements as a dict (object) in the JSON reportMarkus Lehtonen1
Store measurements as a dict, instead of an array, in the JSON report. This change makes traversing of the report much easier. The change also disallows identically named measurements under one test, as a sanity check for the test cases. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: change sorting in json reportMarkus Lehtonen1
Use OrderedDict() instead of sort_keys=True (of json.dump()). Makes for more logical sorting of the values in the report. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oe-build-perf-test: remove unused imports and fix indentMarkus Lehtonen1
[YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oe-build-perf-test: save test metadata in a separate fileMarkus Lehtonen1
The patch introduces a new metadata (.json or .xml) file in the output directory. All test meta data, e.g. git revision information and tester host information is now stored there. The JSON report format is slightly changed as the metadata is not present in results.json anymore. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: report results in chronological orderMarkus Lehtonen1
Write results in the report file in chronological order, instead of random order dependent on test statuses. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: extend xml report format with test descriptionMarkus Lehtonen1
Add test description as an attribute to the <testcase> element. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: extend xml format to contain measurement dataMarkus Lehtonen1
Make the xml report format slightly non-standard by incorporating measurement data into it. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oe-build-perf-test: enable xml reportingMarkus Lehtonen1
Add --xml command line option to oe-build-perf-test script for producing a test report in JUnit XML format instead of JSON. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: include error details in json reportMarkus Lehtonen1
This will typically mean assert message and exception type plus a traceback. In case of skipped tests the reason (i.e. skip message) is included. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: sync test status names with JUnitMarkus Lehtonen1
Use 'failure' instead of 'fail'. Also, use 'expected' instead of 'exp'. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oeqa.buildperf: prevent a crash on unexpected successMarkus Lehtonen1
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23selftest/runtime-test.py: Adapt test to use new runtime frameworkMariano Lopez1
This adapt the current runtime selftest to use the new runtime framework. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime/context.py: Add defaults for runtime contextMariano Lopez1
This adds default values to OERuntimeTestContextExecutor class in order to make easier the execution of exported test that were generated with testexport class. [YOCTO #10686] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23testimage.bbclass: Add package install featureMariano Lopez4
This allows to use the package install feature with the new OEQA framework. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23testimage.bbclass: Add support for package extractionMariano Lopez1
testimage support the installation of packages without a package manager in the target. This adds support for package extraction required to support the installation feature. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/core/utils/test.py: Add functions to get module pathMariano Lopez1
This will add functions to get module file path from a test case or a complete suite. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23runtime/cases/smart.py: Migrate smart testsMariano Lopez1
This migrates the smart test from the old framework to the new one. This has its own commit because smart test was using bb and oe libraries that are available when exporting the test cases to run in a different host. Because of the removal of bb and oe libraries index and packages feeds creation will be managed in testimage bbclass. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime/cases: Migrate runtime tests.Mariano Lopez51
This migrates current runtime test suite to be used with the new framework. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23core/target/qemu.py Adds qemu targetMariano Lopez1
This adds qemu target to be used in testimage. It uses the current QemuRunner class in order to boot and control qemu. [YOCTO #10231] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime/context.py: Add logger to getTargetMariano Lopez1
Current targets (ssh and qemu) require a logger in their constructors, so in order to get a new target we need to provide the logger. [YOCTO #10686] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime/context.py: Prepare for qemuAníbal Limón1
This commit will prepare context to use qemu and not just simpleremote. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-01-23oeqa/utils/dump: Move get_host_dumper to OERuntimeTestContextExecutor classAníbal Limón2
To avoid getVar calls inside a utils module, also moves get_host_dumper import inside testexport isn't needed. [YOCTO #10231] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-01-23oeqa/runtime/context: Move helper functions for process args to executorAníbal Limón1
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-01-23oeqa/runtime/context: Add runtime option group and options for target type ↵Aníbal Limón1
and server ip. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-01-23oeqa/core/context: Add option to select tests to runMariano Lopez1
This add the option to select what tests to run in the <module>[.<class>[.<test>]] format. Currently it just support modules Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/core/decorator: Add skipIfNotDataVar and skipIfNotInDataVarMariano Lopez1
skipIfNotDataVar will skip a test if a variable doesn't have certain value. skipIfNotInDataVar will skip a test if a value is not in a certain variable. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime/utils/targetbuildproject.py: Don't use more than 80 characters ↵Mariano Lopez1
per line Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime/files: Move runtime files from old directoryMariano Lopez4
As part of the refactor we require to move the files used in runtime testing to the new directory. This also adds the path to the runtime test context. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/core/decorator/data.py: Add skipIfNotFeature decoratorMariano Lopez1
This adds a new decorator to check if image under tests has certain DISTRO_FEATURE or IMAGE_FEATURE. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime: Add OEHasPackage decoratorMariano Lopez1
This new decorator will be used to skip the test if the image under test doesn't have the required packages installed. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime: Add case, context and loader classes for runtime testingMariano Lopez3
This adds OERuntimeTestCase, OERuntimeTestContext, and OERuntimeTestLoader to be used for runtime testing. As expected there are some changes in runtime context: - Adds the target to be used for runtime testing, the default is a SSH connection to the device under test running a OE image. - Runtime context requires image manifest because several tests are skipped if a package is missing or installed. - Several tests require the output of the ps command and it changes its output and arguments if busybox o procps is installed, so the case must use the correct ps command. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/core/target Add OESSHTarget to sent commands to targets using SSHMariano Lopez2
With this commit now it is possible to add targets with SSH for testing. Most of it was imported for existing code, with improvements in log handling. [YOCTO #10234] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2017-01-23oeqa/runtime: Move to runtime_casesAníbal Limón31
The new oeqa core framework will modify the structure of the runtime folder the new runtime folder will have python code inside to support runtime test cases. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>