summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-24Revert "Revert "Merge pull request #88 from krocard/improve_travis_debug_build""Kevin Rocard
The pull request #88 was reverted as it broke travis build. In fact it only reveled a bug that was introduced in #80 (1b071fadd). The previous commit 0c0cc95 fixes the problem (cmake variable shadow). Revert the revert (d17b931a3dcc70cf9e) to restore the pull request #88.
2015-04-24Do not use MEMORYCHECK_SUPPRESSIONS_FILEKevin Rocard
The pull request #88 was reverted as it broke travis build. ctest uses a cache variable MEMCHECK_SUPPRESSION_FILE. It sets it during the `include(ctest)` evaluation. Cache variable are set on creation, they can not be modify after by a CMakeList.mk (except with set's FORCE option). ef5736eb5 sets MEMCHECK_SUPPRESSION_FILE as a normal variable. This does not set the cache variable as expected but rather create a second local variable (not part of the cache) with the same name. If cmake was run once (as during travis build since patch 4e41ff7, until its revert d17b931), the local variable has no effect thus the suppression file was never saved in the cache. If cmake was run twice, during the second time, as the cache version is not recreated (cache variables are persistent), the call to set MEMCHECK_SUPPRESSION_FILE changes the cache version as it was first expected. As a result the build worked if cmake was invoked twice but failed if only called once. For more information, see the *** Variable types in CMake *** section at: http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command%3aset This patch fixes all that by not using MEMCHECK_SUPPRESSION_FILE. but rather setting directly the option in valgrind. It is a clean fix as the MEMCHECK_SUPPRESSION_FILE is an option for the user to add a valgrind suppression file, it is not intended to be used by the project direcly. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24Revert "Merge pull request #88 from krocard/improve_travis_debug_build"David Wagner
This reverts commit 339779ac82acb755f6e992bf7ee54e3b791a9ca6, reversing changes made to 1b071faddaf8c5e835ea38d6c8d2d5db88011251.
2015-04-24[Travis] No longer install debug buildKevin Rocard
Debug build used to be installed as it was required for make test. As make test is now stand alone, do not install debug builds. This has several advantages: - slightly faster builds. - make test without install is actually tested by travis. Debug binaries used to overwrite release ones that were installed presciently. As it is no longer the case, and to avoid tests to use installed binaries instead of the local ones, test the debug build *before* the release one. As the debug build is now build (first) in it's own folder, debug and release build can not interfere. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24[Travis] Use gcov long optionsKevin Rocard
Long option are more readable.
2015-04-24Install bash completions in /usr/shareKevin Rocard
With a classic cmake install prefix '/usr', bash completions were installed in /usr/etc/bash_completion.d/ which even before bash-completion 1.9 was incorrect. Since v1.9 all completions are to be installed in /usr/share/bash-completion/completions See: http://anonscm.debian.org/cgit/bash-completion/bash-completion.git/tree/CHANGES#n324 Change the completions install path accordingly
2015-04-24[Travis] Only run gcov through coverallsKevin Rocard
Gcov was run twice, first by the target ExperimentalCoverage and then by coveralls. As coveralls give a better coverage report and cdash is not used, remove ExperimentalCoverage. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24Fail memcheck target on leak or memory errorsKevin Rocard
Some unit test were checked using valgrind, but if an error was detected it was only logged: the build was not failed. Fail to build all *MemCheck targets if a leak or an error is reported by valgrind. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24Add comments in ctest list fileKevin Rocard
Mainly add a some documentation about the custom cmake set_test_env function.
2015-04-24Move ctest definitions in it's own CMakeListKevin Rocard
Ctest related files and definitions were at the source root although we try to keep it simple. Move all ctest related files and definition in a ctest directory. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24Move tests inclusion in a test CMakeListKevin Rocard
The root CMakeList was including every test directories directly, although it should be kept simple. Move the inclusions to a dedicated CMakeList in test. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24Remove unused CXmlElement::setComment methodDavid Wagner
Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24Remove unsued CElement::findAscendantOfKind methodDavid Wagner
Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24Remove unused CElement::getLastChild methodDavid Wagner
Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24coveralls: send coverage report to coveralls.ioDavid Wagner
coveralls.io is a service that uses information from gcov (generated during "make test") to provide a coverage report online: https://coveralls.io/r/01org/parameter-framework Some files must be ignored, specifically: generated files (python bindings and files generated by CMake), tests (because they would inflate the coverage rate) and samples (for now, only the skeleton subsystem). A "badge" is also added to the readme showing the coverage rate. Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24stop messing around with useless pointerSébastien Gonzalve
Backsynchronizer is dynamically allocated for simulation purpose. Nevertheless, this is useless as this can be easily achieved thanks to a typedef. This patch simplify the backsynchronization use. Signed-off-by: Sébastien Gonzalve <oznog@users.noreply.github.com>
2015-04-24Fix for BackSynchronizer related crash on windowsPatrick Benavoli
On windows platform, the definition of a function pointer to a member of a given class requires visibility on the header of that class, otherwize memory corruption may occur at deletion time. Change-Id: Ifa4943ef0f3e02542c6641959cf67384103bfc69 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
2015-04-24Inconsistent name of variable in RuleParserSebastien Gonzalve
Remove misleading hungarian notation of variable name in CRuleParser::iterate() that was making the code hard to read/maintain. Change-Id: I7a034d7999f419263551c3ed9a7c26cda38e3818 Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Type mismatch corrections (Windows 64 bits)Patrick Benavoli
This patch removes the type mismatch warnings revealed by Windows 64 compiler. Wherever necessary, used size_t type for size related data. Change-Id: Ie045ce95940cd83fe8d681168ac9526fc6028d43 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
2015-04-24CXmlFileIncluderElement constructor cleanupPatrick Benavoli
Made _bValidateSchemasOnStart attribute initialized as part of the constructor's initializer list. Change-Id: I8f345b5c17f33e012b69005e01dc31a270e41778 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
2015-04-24Change blackboard write/readString prototypeSebastien Gonzalve
Those functions are used in one place and let the caller transform a std::string to a char * which makes the use of alloca necessary. Moreover, the readString cannot know if the pointer given in input points to a buffer with enough space, making it dangerous. This patch reworks the API so that write/readString() get std::string and lets the implementation play with char *. This also allows to get rid of alloca() use which is quite dangerous. Change-Id: I973e4987278289bb914c4e194b86e924a1c88a6d Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Make line endings consistent in schemas filesSebastien Gonzalve
Some xsd files did not have linux style line endings. Change-Id: Id2ec46bf740679e5736bd7283377c610f7c320f9 Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Removal of unnecessary execution modeSebastien Gonzalve
Spurious execution mode removed from files: - parameter/Element.cpp - utility/convert.hpp Change-Id: I5d47d505e8c3d9f55ad975c34b51d7caa4905ab9 Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Removed spurious ";" after function definitionSebastien Gonzalve
CElementBuilder constructor had a ";" right after its defintion. This patch removes it. Change-Id: I60551bf9610b1760181d9b206a98f566cef78f0b Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Remove deprecated project file for Dev-Cpp IDESebastien Gonzalve
File removed from remote-process folder Change-Id: Iec37d2581fd424e7cfd891224813e57a56caa2a6 Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Prevent multiple inclusions of NativeTokenizer headerSebastien Gonzalve
Added #pragma once on top of the file to prevent multiple inclusion. Change-Id: I351ada48e16bf6bfe84b546da5581b1aa6bce03e Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Utility.h multiple inclusions directive harmonizedSebastien Gonzalve
Replace #ifdef and #define wth #pragma once Change-Id: I60fe1e74a7481be38d9b8e44952e533d7ae80857 Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
2015-04-24Require PTHREAD using cmake canonic wayKevin Rocard
Pthread was required by included directly findPthread.cmake then testing for success. Use the find_package command and require success with the REQUIRED option. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24Remove explicit server stopKevin Rocard
Stopping the remote-processor in the stop command has two side effect: - stopping the remote-processor thread will fail as it is not possible to join a thread to itself. This leads to the leak of all the thread object (destructor not called). - the server will not return the exit command status as it has been stopped during it's execution. Remove the remote-processor stop as it will be called during it's destruction. Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
2015-04-24[coverage] Correct line number msgKevin Rocard
When an error occurs during input parsing, the line number was incorrectly displayed. In python, enumerating an iterable will yield an pair of index and a value. This index starts at 0: next(enumerate([""])) == (0, "") This index was displayed as the line number. Add one to the index to get the line number. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24[coverage]Quote user value in error msgsKevin Rocard
Some pfw bug induce empty criterion value, when log it is dificult to see the the empty value. Add quotes around values. before: Error in criterion After : Error in criterion "" Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24functional-tests: remove dumpElement test caseDavid Wagner
This test is failing (on travis only) for strange reasons. As we can not trust it, let's remove it for now. Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24Add functionnal tests to the pfw.Adrien M
This patch adds functionnal test to the PFW. The execution of these tests needs the test-subsystem to be compiled. The tests can be launch with 'make test'. We set the environment vars in the cmake. Then we launch ACTCampaignEngine.py. Temporary files like build time conf files are placed on the build directory. Next steps : - Test-subsystem needs to be reworked (with binding python). Signed-off-by: Adrien M <adrienx.martin@intel.com>
2015-04-24Dissociate 'make test' & 'make install'Adrien M
Possibility to run the test without having to lunch the 'make install' command. Signed-off-by: Adrien M <adrienx.martin@intel.com>
2015-04-24Fix tUINT32_ARRAY index overflow testJules Clero
This test was using the wrong array size. It leads to false positive. Signed-off-by: Jules Clero <julesx.clero@intel.com>
2015-04-24Fix tSTRING_128 parenthesis errorJules Clero
This test was trying to set string parameter containing parenthesis through remote-process without escaped them. This patch introduces the escaped value in order to correctly use the remote-process command through bash. Signed-off-by: Jules Clero <julesx.clero@intel.com>
2015-04-24Fix tRAW test comparison errorJules Clero
This test is comparing lower case hexadecimal to upper case hexadecimal number. The test was failing because 0xFF is not 0xff when we compare string. As 0xff is read back from filesystem, we now compare it to the right value. Signed-off-by: Jules Clero <julesx.clero@intel.com>
2015-04-24Fix Configuration test to take account of pending configurationsJules Clero
Parameter-framework in now displaying pending configurations, we need to take this in account in our test. Signed-off-by: Jules Clero <julesx.clero@intel.com>
2015-04-24Parameter-Framework functional tests initial commitJules Clero
Import of parameter-framework tests. Simplified test engine and use of python test discovery. Signed-off-by: Herve Garanto <hervex.garanto@intel.com> Signed-off-by: Sylvère Billout <sylverex.billout@intel.com> Signed-off-by: Philippe Colonges <philippeX.colonges@intel.com> Signed-off-by: Jules Clero <julesx.clero@intel.com>
2015-04-24Fix "|" display artifact on inclusive criterion typeFrancois Gaffie
When translating a numerical value to literal for an inclusive criterion type, if the numerical value is not found into the map of pairs, it appends anyway the "|". This patch removes this artifacts display if the numerical value is not part of the acceptable values of this criterion type. Change-Id: I2ff4ee1ae6e6e3ac87c94c596bae3ae534f173c4 Signed-off-by: Francois Gaffie <francois.gaffie@intel.com>
2015-04-24Install c parameter-framework bindingsKevin Rocard
C bindings were compiled and tested but never installed. Add the missing install command. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
2015-04-24Version 2.4.2David Wagner
Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24Add license boilerplates for AndroidDavid Wagner
Some Android release scripts seem to need these files. Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24Re-implement the Tokenizer class from scratchDavid Wagner
It didn't have a license header. Even though we received explicit authorization to use it, it wasn't a comfortable situation. This is an original implementation that only keeps the APIs we use in the parameter-framework and keep them identical (except for a small exception). The behaviour is also exactly the same. Change-Id: I85a69c76027ee026a693d79cd19edd3b86796f9d Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24Add unit tests for the Tokenizer classDavid Wagner
Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24travis: run 'ldconfig' after 'sudo make install'David Wagner
In 327b1a48e2fe539c0ca5414ce9c98b2405536a09 we changed the installation prefix to /usr because we witnessed errors during unit tests using the python bindings. We initially thought that /usr/local/lib wasn't in the loader's default paths but it turns out it is. In fact, it only is the loader's cache that was outdated and needed to be regenerated. That's what ldconfig does. Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24fixed-point-tests: remove some code duplicationDavid Wagner
Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24fixed point tests: some high-precision tests are failingDavid Wagner
Testing slightly-out-of-range values is failing (i.e. the value seems to be wrongfully accepted by the parameter-framework) starting from high precisions, e.g. q0.16. The cause is: 1) When converting strings to fixed-points, the parameter-framework first parses the input string as double. Doubles have 52 fraction bits and there for 15 decimal-digits-precision (52 * log10(2) == 15). 2) When displaying Qn.m numbers, we decided to display all representable digits (i.e. m digits) instead of only displaying significant digits because that would cause unpredictable behaviour. See d299108157ee4d0eadb7683b2fa6a6635bc63d95 and 59cc1e33810c55e6fa1e3bd320e1cf29e24d23be for more information. 3) However, the precision for a Qn.m fixed-point number isn't m but m * log10(2). This is guaranteed to be less than the precision of a double but the tests mentioned at the beginning were written as if the precision was m, which may be larger than the precision of a double. This is what caused the test failures. The tests are adapted to try and set a value of which the last significant digit is one-off too far outside of the allowed range. For lower-precision number, other less-far-off values could be correctly rejected by the parameter-framework but that's only because of the underlying implementation (using doubles as intermediate values) and it seems hardly relevant to check. Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24fixed-point-tests: abort if a getParameter failsDavid Wagner
We used to drop errors during "get" operation because it is unlikely to fail and not in the scope of the fixed-point tests. However, we should catch such error and abort immediately. Signed-off-by: David Wagner <david.wagner@intel.com>
2015-04-24fixed point tests: use the python module instead of remote-processDavid Wagner
Using the python bindings is much faster and easier than using the network interface. Signed-off-by: David Wagner <david.wagner@intel.com>