summaryrefslogtreecommitdiff
path: root/scripts/sanitycheck
AgeCommit message (Collapse)Author
2017-01-18sanitycheck: improve terse outputAndrew Boie
Values now spaced 4 apart since we commonly build thousands of tests. Percentage complete indicator added. Change-Id: Ia7454dc1e8cc0701dc74dc8a4f6e7a37706524e8 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-18build: remove obsolete sections from linker scriptsAndrew Boie
These were causing some issues in the old kernel, but the unified kernel no longer uses these. Issue: ZEP-513 Change-Id: I87216565231cd244886fbffe4b4d420d1687b245 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-13sanitycheck: riscv: add vector to recognised sectionsAnas Nashif
Change-Id: I7f1692eb1bd51b8efc16919780aebaf890b8872c Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-11sanitycheck: properly identify when QEMU crashes outAndrew Boie
This had been erroneously reported as a build error. Issue: ZEP-1460 Change-Id: Idddaf833011beb1165bd766dd115c021c5b90cdf Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-11sanitycheck: don't explode if log data can't be readAndrew Boie
Issue: ZEP-723 Change-Id: I5d2b2e756fed7e2906da1e84c2da332682893660 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-01-05sanitycheck: reduce number of unnecessary configuration buildsAnas Nashif
When running a reduced set of tests with --platform-limit or using the default of 1 we build the configuration (make initconfig) for all platforms, although we are only interested in a limited set. On my machine this is 100s of build time for configurations we are never going to use. This reduces the number of builds to what we really need and speeds up sanitycheck runtime overall. Might need a few more optimisations. Change-Id: I813fabf1453f19ce7a83b28e4792b5c80616d936 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-03sanitycheck: add --log-file to log everything to a file tooInaky Perez-Gonzalez
Currently CI plays tricks with `tee` to capture the output and post process it. This makes it more complex to handle and easier for it to fail in ways it should not. So add a simple log capture option sanity check that mirrors the stdout output, removing color encoding for errors. Change-Id: I6de0b6cfe4da9c289f537979545dddbcd49cf834 Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-12-30Revert "sanitycheck: reduce number of unnecessary configuration builds"Kumar Gala
This reverts commit 4e2cf33d9def11193f5998e5fe74465b6a30536b. The change does not work correct if we have a filter and specify a specific platform, such as: ./scripts/sanitycheck -p 96b_nitrogen -i -s samples/hello_world/test_singlethread Change-Id: I43a4f25ed25c8fe5379cda23b6dbfa8f9ae5cb0d Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-12-28sanitycheck: reduce number of unnecessary configuration buildsAnas Nashif
When running a reduced set of tests with --platform-limit or using the default of 1 we build the configuration (make initconfig) for all platforms, although we are only interested in a limited set. On my machine this is 100s of build time for configurations we are never going to use. This reduces the number of builds to what we really need and speeds up sanitycheck runtime overall. Might need a few more optimisations. Change-Id: I53d6bacf66045dde7baabbaa40b4fbfc4a01782a Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-28sanitycheck: remove kernel keywordsAnas Nashif
Change-Id: I076491f58147ffc70d84b62e1d78b4ae419add7b Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-12-02net: Declare a macro to define stacks used by networkingJukka Rissanen
The macro defines the stack as usual, but if user has enabled net shell (CONFIG_NET_SHELL), then additional information about the stack is stored in net_shell linker section. The information in the net_shell linker section is then used to print information about the stacks in the networking sub-system. Change-Id: Ic6e9f16a73a192b9a59d32a6d0070322382f98bd Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02net: Remove nbr_data section as it is uselessJukka Rissanen
No need to store the nbr pool data into a dedicated section as we have only one nbr pool defined. Change-Id: I6f2afcce57b5f588878496bf085567b938e32c80 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2016-12-02sanitycheck: Add support for section net_l2_dataTomasz Bursztyka
We missed that section, so sanitycheck was failing. Also putting the right section in the relevant array. Change-Id: I361ffa1707c01f0d3c870a7bc36a86ada66af1d2 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-02sanitycheck: Recognize native IP stack specific sectionsTomasz Bursztyka
Without these, test case will fail miserably. Change-Id: Ib46d167b8782c33362ac6edb9d8c50abc25908c0 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-12-01sanitycheck: allow error on deprecation warningsAnas Nashif
Added new option to make sanitycheck script error on deprecation warnings, to use: sanitycheck --error-on-deprecations For example, to find usage of legacy APIs in master, run the following: sanitycheck -e legacy --error-on-deprecations Change-Id: Ib83c266c8357475840dea03d62ceefed72b73f27 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-30sanitycheck: allow for extra binary sections in testcase.iniAndrew Boie
Change-Id: I9e47a58f3f32ba093f7916af111a289b620c30d5 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-29sanitycheck: abort if last_sanity.csv not foundAnas Nashif
When running --only-failed make sure last_sanity.csv exists. Change-Id: I862529a58f337987c37da83fd5541dd4f42b3391 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-11-04sanitycheck: build for unified kernel onlyAndrew Boie
Change-Id: I3bd744b10341bc7292fb0670faf217933efe9edc Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-11-02unified: Add linker script support for all kernel object typesAllan Stephens
Enhance the linker script so that all statically-defined kernel objects of a given type are co-located. Note 1: This capability is needed so that static kernel objects can be added to the associated object tracing list. (Some kernel object types are already co-located to permit the kernel to do other initialzation on statically-defined objects.) Note 2: A follow-up commit is needed to ensure statically- defined kernel objects are placed in the sections referenced in the linker script. Note 3: The legacy script info remains for now to allow applications using the microkernel or nanokernel to continue to build. Change-Id: I40d831f9e183fb121c950e30fa8298b6d529375b Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
2016-11-02console: shell: Support multiple modulesYael Avramovich
Ability to use Zephyr shell by multiple modules simultaneously, each module for its own usage. Old shell implementation enabled the user to call only one module commands, not all of the modules simultaneously. Change-Id: I0ef8fa2fd190b7490c44fe91d1016363258302c9 Signed-off-by: Yael Avramovich <yael.avramovich@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-28sanitycheck: Add support for ccacheKumar Gala
Add a ccache option to allows enabling the use of ccache for builds generated by sanitycheck. Change-Id: Ia997ed29f38a3d2d71ba143456e6fcbc5946d56e Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-10-27sanitycheck: filter out the prebuilt.elf introduced by Makefile cleanupAnas Nashif
commit 018b831a369d6b3435bd1d6ecfe7b77915dd0acf keeps another elf file in the outdir which confused the sanitycheck script. Change-Id: I87a9bcee6afe6526ecc24f1f5d9cf38101247ce2 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-25sanitycheck: Add support for unified kernelSzymon Janc
This fix sanitycheck for apps that specify unified kernel. Change-Id: I3f1c4d5a566f6833e56bbda097cb497ccdbfbec9 Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2016-10-25sanity: Load arguments from filesGenaro Saucedo Tejada
Python module argparse has a feature to load arguments from a file. This commit enables such feature on sanitycheck script so files prefixed by + (plus sign) are loaded during argument parsing stage and included as arguments to such script. Jira: ZEP-122 Change-Id: Ibb0a6e8464218a4f58ce4044a5a0860dc5b32480 Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-10-24sanitycheck: provide option to exclude tagsAnas Nashif
This will make it possible for us to optimize the list of tests we run, for example, we could exclude footprint tests from the main run because those are run as part of the footprint checks later in the CI job. Use like this: sanitycheck -e footprint Change-Id: I4e7a3aa6fac2ba1c9c99b356f08459da97fda777 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-10-05sanitycheck: Remove linker VMA/LMA offset checkingAndy Ross
This misfeature can crop up at development time as the linker scripts are modified, not just as a regression in known tests (c.f. ZEP-955). So it makes more sense to put it in a check_link_map script inovked for every build. Remove it from sanitycheck. Change-Id: I9c2f47a26a3bc03170b895545476350341e91170 Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-09-30tests: Add gcov supportJaakko Hannikainen
If the -C flag is given to sanitycheck, generate gcov files for unit tests and render them with lcov. Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com> Change-Id: Ic25eae6a3cfc2c45595bd6aa235df2c483aaf6ec
2016-09-30ztest: Add native building supportJaakko Hannikainen
This commit allows building tests using the ztest framework without including Zephyr. This can be used to enable unit testing single functions, even static ones. Origin: Original Change-Id: Ib7e84f4bd9bbbf158b9a19edaf6540f28e47259f Signed-off-by: Jaakko Hannikainen <jaakko.hannikainen@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-09-20unified: Implement memory poolsDmitriy Korovkin
Due to the memory pool structure only static declaration of memory pool is possible. Change-Id: I4797ed88fd2ac3b7812ff26e552e1745611c4575 Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-09-14gpio: Remove obsolete API 1.0 callback mechanismTomasz Bursztyka
In 1.0 you could set only one callback on the whole gpio controller. It was impossible for another sub-system to add another callback, without overwritting an existing one. Such API has been obsolete for a long time and no one is using it anymore. Thus removing it entirely. Change-Id: I6a17fd99373dc6cef1fa2ebb421e992412d5015e Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-09-06sanitycheck: allow extra arguments to be passed to the buildAndrew Boie
In some cases, particularly when developing experimental features, it is useful to be able to pass parameters to 'make' globally for all sanity checks. Change-Id: I19eddf222a74064cf6f22ec641fa6b4ff72992e7 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06sanitycheck: complain loudly about missing platformsAndrew Boie
If defconfig files exist under boards/ that don't correspond to the set of platforms defined in the .ini files under scripts/sanity_chk/arches, complain about this. We should be at least compiling all our supported platforms in CI runs. At the moment it flags 5 boards. Future patches should either add these boards to the appropriate arch .ini files or remove them from the kernel. Change-Id: Id825d6c6bd32089d9f1bead11bc0765685e3771a Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-30sanitycheck: support for multiple toolchainJavier B Perez
Added support for multiple toolchain usage. Every arch contains a list of supported toolchain. Each board can override the supported toolchain list. If the board is not supported in the current toolchain, will be discarded. The current toolchain is defined by ZEPHYR_GCC_VARIANT. Added support for toolchain ISSM and ZEPHYR. Change-Id: I31e9b39ba01f6e9bdc4557702428cd09e05f492a Jira: ZEP-592 Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-29sanitycheck: filter: add support to use env variablesJavier B Perez
Added support in the sanitycheck to use env variable value in the filter. Change-Id: I76388dc04557dcd31e651d23ae8edf96a8fe2474 Jira: ZEP-592 Signed-off-by: Javier B Perez <javier.b.perez.hernandez@intel.com>
2016-08-10sanity: non utf-8 characters are toleratedGenaro Saucedo Tejada
Sanity check script was not handling non utf-8 characters as a result it crashed and didn't kill qemu and test used to hang. Now tests fail upon untranslatable bytes. JIRA: ZEP-673 Change-Id: I885a185e0481083501fce15cd51412bfdd26a7d7 Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-28sanitycheck: allow deprecated APIsAndrew Boie
sanitycheck is set up to error out on any compiler warnings. However in the case of deprecated APIs, we may feel compelled to still test them while they remain in-tree. Don't fail the build if deprecated APIs are used during sanity runs. Change-Id: Ic3196896689706d308117e693ab720713d67d698 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-20sanitycheck: add -R to build all tests with assertionsAndrew Boie
Some tests individually enable assertions; this forces them on for all tests. Intended for use with daily builds. Disregard footprint or benchmark data with this enabled. Change-Id: I7a0822432d5cab7f3ab0767faf214fde536cd68e Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-10nios2: set up common linker script for XIP and non-XIPAndrew Boie
We will require 6 variables to be defined by SOC-specific linker script; these values in turn can be pulled from defines in layout.h. To help position code correctly we define two new ELF sections for this arch, 'reset' and 'exceptions'. Change-Id: Idffbd53895945b7d0ec0aac281e5bf7c85b4b2c2 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-02expr_parser: support ':' operatorAndrew Boie
Similar to '==' but compiles the RHS into a regular expression and attempts to match whatever is in the environment against it. Change-Id: I7a03452ef88d067b62661d14dc6f42273de436fa Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04sanitycheck: allow for more expressive filtering in testcase.iniAndrew Boie
The old 'config_whitelist' directive in testcase.ini has been removed. We use the new expr_parser module to parse a 'filter' directive which is a boolean expression. This gives a great deal more flexibility in how tests can be filtered. To keep the tree bisectable, use of config_whitelist in testcase.ini converted to the new expression language. Change-Id: I0617319818c5559c0f0569d2fa73d09b681cac51 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-22gpio: Improve the public API to handle multi callbacksTomasz Bursztyka
Many sub-systems might require to set a callback on different pins. Thus enabling it via changing the API. It is also possible to retrieve private-data in the callback handler using CONTAINER_OF() macro (include/misc/util.h). Former API is still available, and is emulated through the new one. Using both should not be a problem as it's using new API calls. However, it's now better to start using the new API. Change-Id: Id16594202905976cc524775d1cd3592b54a84514 Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2016-04-12sanitycheck: align output for easier visual comparisonDaniel Leung
() The test names are getting longer so adds more padding. () Aligns the numerical size numbers for easier visual comparison when scrolling in shell. Change-Id: Id218a641e9d5dffb77bf813ffbd828c48d14020f Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-08sanitycheck: fix test names to be same as beforeAndrew Boie
Add the last path information in the testcase root to the test name, so that there is much less of chance of name collisions and the reports come out with the same names as before. Change-Id: I75ed6ee96251058dd2547e57be31db3c2517a497 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-08sanitycheck: be smarter about scanning for test casesAndrew Boie
A recent tree change moved testcases to both the tests/ and samples/ directory. The default testcase root was just made the root of the Zephyr tree, which could lead to potentially long scan times as every single directory in-tree was checked. For example, it could be very time-consuming to scan everything under the sanity-out/ dir if -n is used and --all was used in a previous run. Now we allow multiple testcase roots to be supplied on the command line, and by default only scan under tests/ and samples/. Change-Id: I8dac747835b87801474e08c236913e04db64f87b Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-08sanitycheck: add ability to use arbitrary report for comparisonDaniel Leung
This adds the ability for sanitycheck to use arbitrary report file for size comparison. This is useful when optimizing binary size. For example, a report can be generated with master head, and used as base for comparison. Change-Id: Id8c61146c498ba62c4cc77a9ef7d390c0fb11487 Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-08sanitycheck: parallelize binary size calculationsDaniel Leung
Instead of running nm/objdump and parsing the results one testcase at a time, do these in parallel to speed up sanity check a bit. The sanitycheck now requires at least Python 3.2 to run because of the usage of concurrent.futures. This reduces build time (--all -b) from 4:30 to 3:08 on 24C/48T Xeon-E5. Change-Id: I8e7c1efb2f473c7f2b65658f8ed9a101ed091eea Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-04-07sanitycheck: fix initlevel section being mentioned twiceDaniel Leung
The "initlevel" section is being metioned twice. It does not affect the final size calculation, but just remove it just for reader's sanity. Change-Id: I0e7d6e82c730631d2c83ca09dde0f675805840f3 Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2016-03-23sanitycheck: don't require arch.ini blocks for every platformAndrew Boie
If the arch ini file doesn't have a specific block for the platform, just assume all defaults. Change-Id: Id6ab1ede8936bdd6006a5c4fd2f9a4f6aaf42478 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-23sanitycheck: allow N platforms per arch to be runAndrew Boie
It is an unfortunate fact of life that our CI machines are often severly underpowered virtual machines that take quite some time to run sanitycheck --all. The only other option was to just use the default test case filtering semantics which chose one platform per arch to test. Now it is possible to specify N platforms per arch with the new --platform-limit option, allowing greater flexibility on how many tests will be run. The counter-intuitive use of '--platform all' or '--platform default' is no longer supported as these use-cases are covered by other command line options. Change-Id: I45b0050df52e1a22e75534a3876d89e3c77698c9 Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-03sanitycheck: fail on footprint analysis of stripped ELFsAndrew Boie
These don't have necessary symbol information to determine if the kernel is XIP or not. Fail instead of giving bogus data. Change-Id: I87f6eeb5983f5275929e5b8d448a054b83e23d8f Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>