summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix tRAW test comparison errorJules Clero2015-04-241-1/+2
| | | | | | | | | 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>
* Fix Configuration test to take account of pending configurationsJules Clero2015-04-241-1/+1
| | | | | | | 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>
* Parameter-Framework functional tests initial commitJules Clero2015-04-2468-0/+15220
| | | | | | | | | | 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>
* Fix "|" display artifact on inclusive criterion typeFrancois Gaffie2015-04-241-1/+4
| | | | | | | | | | | | 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>
* Install c parameter-framework bindingsKevin Rocard2015-04-241-0/+2
| | | | | | | | C bindings were compiled and tested but never installed. Add the missing install command. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Version 2.4.2David Wagner2015-04-241-1/+1
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>
* Add license boilerplates for AndroidDavid Wagner2015-04-243-1/+32
| | | | | | Some Android release scripts seem to need these files. Signed-off-by: David Wagner <david.wagner@intel.com>
* Re-implement the Tokenizer class from scratchDavid Wagner2015-04-243-181/+150
| | | | | | | | | | | | 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>
* Add unit tests for the Tokenizer classDavid Wagner2015-04-243-0/+165
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>
* travis: run 'ldconfig' after 'sudo make install'David Wagner2015-04-241-4/+7
| | | | | | | | | | | | 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>
* fixed-point-tests: remove some code duplicationDavid Wagner2015-04-241-23/+13
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>
* fixed point tests: some high-precision tests are failingDavid Wagner2015-04-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fixed-point-tests: abort if a getParameter failsDavid Wagner2015-04-241-3/+8
| | | | | | | | 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>
* fixed point tests: use the python module instead of remote-processDavid Wagner2015-04-241-48/+39
| | | | | | | Using the python bindings is much faster and easier than using the network interface. Signed-off-by: David Wagner <david.wagner@intel.com>
* fixed point tests: remove trailing zeros from valuesDavid Wagner2015-04-241-0/+3
| | | | | | | The fixed-point tests are user-input tests. Since a user isn't likely to input any trailing zeros, let's remove them. Signed-off-by: David Wagner <david.wagner@intel.com>
* fixed point tests: return 1 in case of failureDavid Wagner2015-04-241-3/+15
| | | | | | | The fixed-point tests did not return any error code even upon failure. This lead to believing that they were passing. Signed-off-by: David Wagner <david.wagner@intel.com>
* python bindings: install modules to the dist-packages directoryDavid Wagner2015-04-241-2/+14
| | | | | | | | Use python to get the OS's directory name for dist-packages. The python bindings (low-level shared library and python proxy class) are then installed to that path, prefixed by the cmake install prefix. Signed-off-by: David Wagner <david.wagner@intel.com>
* cmake/python bindings: reorganize include_directories() instructionsDavid Wagner2015-04-241-4/+2
| | | | | | | | | | 1) PYTHON_INCLUDE_PATH is deprecated in favor of PYTHON_INCLUDE_DIRS 2) adding the current source directory to the include dirs is useless since it is implicit. 3) group all include_directories() instructions to the same place in the makefile. Signed-off-by: David Wagner <david.wagner@intel.com>
* cmake/python bindings: remove duplicated PythonLibs inclusionDavid Wagner2015-04-241-6/+1
| | | | | | | | It was included by both find_package() and include(); the success of the inclusion was then checked manually. Instead, find_pacakge(PythonLibs REQUIRED) does the inclusion and the checking automatically. Signed-off-by: David Wagner <david.wagner@intel.com>
* C pfw bindingsKevin Rocard2015-04-246-0/+1143
| | | | | | | | | The pfw can not currently be used from c code. Add an c api. It does not target a perfect one/one mapping with the c++ one, but rather aim ease of use and type safety (as far as possible in c). Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Android/xmlGenerator: Fix domainGenerator.py's dependenciesDavid Wagner2015-04-241-1/+1
| | | | | | | | | | | | | 32bit target names are postfixed with "_32". This was missed in the list "required modules" for domainGenerator.py" which caused _PyPfw.so not being compiled when needed. Android only contains a 32bit version of prebuilt python. Fix LOCAL_REQUIRED_MODULES for domainGenerator.py Change-Id: Ieda460d0c4785bc2d1c2c14e38f5a73c66672497 Signed-off-by: David Wagner <david.wagner@intel.com>
* domainGenerator.py: more flexible argumentsDavid Wagner2015-04-241-2/+3
| | | | | | | | | | Allow optional arguments (initial settings, single domains, EDDs) to be passed with an empty list of files. This will make it a lot easier to write helper scripts. Change-Id: I99527376b25d607616a3e73f6b62d556b79a90d2 Signed-off-by: David Wagner <david.wagner@intel.com>
* travis: set the installation prefix to /usrDavid Wagner2015-04-241-3/+3
| | | | | | | | | | | | CMake defaults to /usr/local which results in libraries being installed in /usr/local/lib. Unfortunately, this path isn't in the loader's default locations. The canonical installation path is /usr. /usr/local is recommended for stuff not handled by the package manager but in the context of the CI, this isn't relevant. Signed-off-by: David Wagner <david.wagner@intel.com>
* Fail build if test are enabled but can not be builtKevin Rocard2015-04-241-5/+3
| | | | | | | | | | The fix point parameter test used to display a warning if it could not be run. Transform it to an errors if the tests are explicitly activated through the BUILD_TESTING option. BUILD_TESTING is declared by ctest. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Modularise build using cmake optionsKevin Rocard2015-04-243-3/+16
| | | | | | | | | | | | | | | | | The parameter framework can build lots of components including but not limited to core c++ lib, c api, python api, bash completion... All those modules are not always wanted, especially if they have external dependencies as it force the builder to install them. Conditionally define non core build modules. The builder can disable feature by providing -D <FEATURE>=OFF to deactivate them. The following options are available: - PYTHON_BINDINGS: Break swig dependencies - BASH_COMPLETION: If the target does not have bash - COVERAGE: Default to off, set to on to build c/c++ with coverage flags. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Use ctest for testingKevin Rocard2015-04-243-6/+21
| | | | | | | | | | | | | Test were enabled with the enable_testing command. Nevertheless this method is very basic. Include CTest, as this cmake utility enables automatic build + test + coverage generation + memchek test (valgrind) + sending report in one command: ```make Experimental``` There are far more features added by this utility, see: http://www.cmake.org/Wiki/CMake/Testing_With_CTest#Dashboards Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Reformat .travis.yml test commandsKevin Rocard2015-04-241-4/+8
| | | | | | | | Do not execute tests if the build fails. Indent the commands for readability. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Print test output if the test failsKevin Rocard2015-04-241-1/+1
| | | | | | | | ctest by default put all logs in a file and never display it even if a test fails. Add the relevant option to output on failure. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Install a recent gcc, gcov, cmake and ctest versionKevin Rocard2015-04-241-2/+10
| | | | | | | | | | | | | | The c pfw interface (following patch) needs a recent gcc to compile. Gcc and gcov version need to be align, thus gcov is updated too. Ctest analyse the gcov output, as a result it must be align with it (gcov 2.7 changed it's report format). Ctest, and cmake are packaged together. Conclusion: update cmake and gcc packages. Unfortunatly ubuntu backport does not provide a recent enough version, that is why ppa were used instead. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Remove dead getRoot member function from elementJules Clero2015-04-242-20/+0
| | | | Signed-off-by: Jules Clero <julesx.clero@intel.com>
* Handle config path without slashKevin Rocard2015-04-241-5/+7
| | | | | | | | | If the parameter configuration file path does not contain a "/" it used to assert as it could not find it's folder. Use "." this case. Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
* [remote-processor] Remove useless newKevin Rocard2015-04-241-4/+1
| | | | | | | | | Message::readString was temporally allocating a buffer on the heap (with new). Use variable length arrays to allocate the buffer on the stack. Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
* android/python bindings: force gcc and 32bits compilationDavid Wagner2015-04-232-0/+74
| | | | | | | | | | | Since Android only provides a 32bits version of the python interpreter and libs, we need to compile for 32bits even on 64bits hosts. Also, since it seems that clang is the default compiler for host, we need to explicitely forbid it as long as the parameter-framework is compiled with gcc. Change-Id: I5d484c0e58c304680192f443acd81258de179e52 Signed-off-by: David Wagner <david.wagner@intel.com>
* Merge pull request #51 from cc6565/fix-pipe-issueDavid Wagner2015-02-191-0/+1
|\ | | | | Output parameter within getNumericalValue not initialized
| * Output parameter within getNumericalValue not initializedFrancois Gaffie2015-02-191-0/+1
|/ | | | | | | | | | | | | | When calling getNumericalValue on inclusive criterion, the value to be outputed is never initialized. The Criterion type will append the value corresponding to each literal value to the uninitialized value leading to undefined behavior. This patch initializes the output value. Issue: GMINL-6007 Change-Id: Id9fc8b010b4d0b6dfc921825387817789d35e5ba Signed-off-by: Francois Gaffie <francois.gaffie@intel.com>
* Merge pull request #50 from dawagner/make_parametermgr_init_privateDavid Wagner2015-02-192-2/+4
|\ | | | | Make CParameterMgr::init private
| * Make CParameterMgr::init privateFrederic Boisnard2015-02-182-2/+4
|/ | | | | | | | | | | Since 3adb785eb097028750fc1b4c5ecab3bebf1a9ae3, CParameterMgr::init should not be called directly. However, it was kept public and CParameterMgrFullConnector was using it. Make it private and remove its use from CParameterMgrFullConnector. Signed-off-by: Frederic Boisnard <frederic.boisnard@intel.com> Signed-off-by: David Wagner <david.wagner@intel.com>
* Merge pull request #43 from dawagner/fix-systemclass-toxmlDavid Wagner2015-02-182-6/+0
|\ | | | | Fix SystemClass::toXml and remove useless overriden methods
| * SystemClass: remove useless overridden init() methodDavid Wagner2015-02-182-6/+0
|/ | | | | | | | The overridden implementation was only calling the base implementation. It can therefore can be completely removed as it is the default behaviour. Change-Id: Ic0eadf82abfdaad0ca76d3e9a757544d5ec31427 Signed-off-by: David Wagner <david.wagner@intel.com>
* Merge pull request #41 from krocard/fix_string+num_concatDavid Wagner2015-02-181-1/+1
|\ | | | | Fix pointer arithmetic instead of concat
| * Fix pointer arithmetic instead of concatKevin Rocard2015-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | `"my number " + 5` does not produces `"my number 5"` but rather `"mber "`. If the number was greater than `len(string) + 2` (pointing to the \0 and one past the end in authorized, more in UB) the result would have been undefined behaviour. Transforme the number to std::string using toString. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* | Merge pull request #49 from pafonso/iminleg_rebaseDavid Wagner2015-02-1837-202/+498
|\ \ | | | | | | Iminleg rebase
| * | Fix SystemClass duplicate 'Name' attribute in xml exportDavid Wagner2015-02-182-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When refactoring Element::toXml, we forgot to make the necessary adaptation in SystemClass::toXml. The latter does not need to set the Name attribute anymore because this is taken care of by the base toXml method. SystemClass::toXml now only calls the base and can therefore be completely removed. Change-Id: Ibd12feaac2c101dcc22e8716e332cb02f03ba99a Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-19676 Signed-off-by: David Wagner <david.wagner@intel.com>
| * | Add libremote-processor as dependencyPhilippe Afonso2015-02-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libremote-processor headers are needed by the parameter core. This patch adds explicitily the dependency to this module. Change-Id: I7a223a0abd35f9524a047ca92e1029c5cef38e38 Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-19676 Signed-off-by: Philippe Afonso <philippex.afonso@intel.com>
| * | Create output host library directory if neededPhilippe Afonso2015-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directory where to generate output may not exists leading generation to failure. This patch adds the directory creation and thus makes sure generation won't fail for this reason. Change-Id: I1cee75d6d7921315dc3a928245499bde447c3639 Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-19676 Signed-off-by: Sebastien Gonzalve <sebastien.gonzalve@intel.com>
| * | Create a Logarithm Adaptation parameter typePiotr Diop2015-02-188-7/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some parameters need to be converted to logarithm. This can be the case for volumes that come from HAL as mere decimal values. This patch adds the LogarithmAdaptationParameter type. Change-Id: Ic64232816a82c56a6ddffa5fdccda356eb4ec9c7 Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-16954 Signed-off-by: Piotr Diop <piotrx.diop@intel.com> Reviewed-on: https://android.intel.com:443/320371
| * | [Workaround][xmlGenerator] Increase retry on EADDRINUSEKevin Rocard2015-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During host domain generation, a port must be chosen before spawning a servers, producing an error if someone else uses it before the server. This race was workaround by retiring 10 times before failing. This divided the failure probability by 10, but is no longer sufficient. A correct implementation without this race is currently been developed (without socket) but until then change the retry number from 10 to 1000. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com> Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-17358 Change-Id: Ie80e4508952ef150eb999d9a6fa7e60b61825f35 Reviewed-on: https://android.intel.com:443/319856
| * | Remove remote process socket connection timeoutKevin Rocard2015-02-182-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From time to time, on Buildbot, the PFW generation build step fails due to remote processor socket connection timeout. In order to avoid deconnection when the peer is slow, this patch removes the remote processor socket connection timeout. Change-Id: I56b5b4b846a7489accd56ba3a3224dc1ffc1085e Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-5511 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: https://android.intel.com:443/289012
| * | Cleaned up XML export featurePatrick Benavoli2015-02-182-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 209937 This patch solves 1 issue regarding XML export feature: - ParameterMgr.cpp::exportElementToXMLString(): This method was receiving a useless bValidateWithSchema argument. Indeed, elements in memory are necessarily valid (unlike documents coming from external sources). Change-Id: I55bf84c8ff53c37c9fc55e60f7f64e8776a43dc7 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>
| * | Missing error reporting statement in XML Export featurePatrick Benavoli2015-02-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 209937 In case an error is encountered during the XML encoding operation, no error message is created to log the issue. This patch updates XmlStringDocSink.cpp::doProcess() so that the error string is filled in case of errors. Change-Id: Ie93e50f857506b8637b1bb0dd8d411a01f16ec49 Signed-off-by: Patrick Benavoli <patrick.benavoli@intel.com>