aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Move tests inclusion in a test CMakeListKevin Rocard2015-04-241-0/+33
| | | | | | | | | 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>
* Remove explicit server stopKevin Rocard2015-04-241-3/+0
| | | | | | | | | | | | | | 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>
* functional-tests: remove dumpElement test caseDavid Wagner2015-04-242-136/+0
| | | | | | | 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>
* Add functionnal tests to the pfw.Adrien M2015-04-2448-185/+993
| | | | | | | | | | | | | | | | 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>
* Dissociate 'make test' & 'make install'Adrien M2015-04-242-1/+8
| | | | | | | Possibility to run the test without having to lunch the 'make install' command. Signed-off-by: Adrien M <adrienx.martin@intel.com>
* Fix tUINT32_ARRAY index overflow testJules Clero2015-04-241-1/+1
| | | | | | This test was using the wrong array size. It leads to false positive. Signed-off-by: Jules Clero <julesx.clero@intel.com>
* Fix tSTRING_128 parenthesis errorJules Clero2015-04-241-2/+10
| | | | | | | | | 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>
* 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>
* Add unit tests for the Tokenizer classDavid Wagner2015-04-242-0/+164
| | | | 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>
* 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>
* Fixing TestPlatform.cpp file coding styleJules Clero2015-01-291-91/+114
| | | | | | | | | | BZ: 213233 TestPlatform.cpp has been edited regarding uncrustify suggestions. Change-Id: Iac75c5923d5bf9836730ca6f21789967a98895e9 Signed-off-by: Jules Clero <jules.clero@intel.com>
* Fix test-platform set criterion by Lexical State BugJules Clero2015-01-291-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 213233 The setCriterionState command of the Test Platform was setting undesired value when asking for multiple states to an InclusiveCriterion. The method used in setCriterionStateByLexicalSpace was to parse arguments before to get numerical value for each of them with the getNumericalValue method from ISelectionCriterionTypeInterface. Then, different masks were aggregated to set the criterion's state. Regarding the getNumericalValue method behaviour which parses automatically value arguments, this method leads to undesired bytes in the mask which leads to undesired criterion's state. The solution is to aggregate the setCriterionState arguments when more than one arg are used. As getNumericalValue use | to split his first parameter, the code has been modified to use this behaviour. getNumericalValue is now called only one time and the returned mask is directly used to set criterion's state. Change-Id: Ie3a1d79a6f66928a2418f11233ff0d1ef5c3e900 Signed-off-by: Jules Clero <jules.clero@intel.com>
* Merge pull request #28 from krocard/ctest_configDavid Wagner2015-01-221-0/+37
|\ | | | | Integrate fix point parameter test in cmake
| * Integrate fix point parameter test in cmakeKevin Rocard2014-12-101-0/+37
| | | | | | | | | | | | | | | | | | | | | | Cmake can manage test with ctest. Running them when make test is run. Unfortunately the only automatic tests the pfw has (fix point parameter test) are not declared in cmake. Add a test target and declare the fix point parameter test in cmake. Thus a simple make test after the make install will run all tests. Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
* | test-platform: fix boolean remote getter commands outputDavid Wagner2015-01-021-2/+1
|/ | | | | | | | | | | | | | | Getter commands return a boolean value ("true" or "false") were implemented by a generic method. However, this method returned a "Done" result, which suppresses the normal output and prints "Done" instead. This is fixed by making this method return a "Success" result, which is interpreted as "give the output to the user". In the same time, we remove a useless "cast to void" which is usually a workaround for unused variables. Change-Id: I49115d3b29967fd455ffc0b703dfb4f4d438280e Signed-off-by: David Wagner <david.wagner@intel.com>
* fixed-point-tests: strip the '_host' suffix on executablesDavid Wagner2014-11-031-2/+2
| | | | | | | | | | | | | | This only makes sense on the Android build system. However, these tests are broken on Android because libremote-processor is compiled as "libremote-processor_host.so" on Android whereas libparameter will only try to load "libremote-processor.so" anyway. For now, let's ignore the Android build system and only care about how we do it with CMake: CMake builds libremote-processor.so, test-platform and remote-process so let's remove the "_host" suffixes that were added for compatibility with the output of the Android makefiles. Signed-off-by: David Wagner <david.wagner@intel.com>
* fixed-point-tests: Run the tests for each possible parameter sizeDavid Wagner2014-11-032-706/+713
| | | | | | | | | | | | | | A lot of parameters were duplicated because we had one parameter for each size (8, 16 and 32) and for each integral/fractional combination. However, they were all at the root of the subsystem and a lot overlapped, e.g., q1.2 for 32bits and q1.2 for 16 bits. We fix this by: - Adding a ParameterBlock for each size - Modifying the tests to account for the change in the parameter paths - Run the tests for 8, 16 and 32 bits Signed-off-by: David Wagner <david.wagner@intel.com>
* Merge pull request #20 from 01org/fix-build-issues-bisDavid Wagner2014-10-241-0/+6
|\ | | | | Fix build issues bis
| * Android.mk: declare intel as module ownerDavid Wagner2014-10-241-0/+2
| | | | | | | | | | | | | | This seems to be mandatory. Change-Id: Idba8c7a3ec9e2f05b28ee593d1d15a420a0bd9ed Signed-off-by: David Wagner <david.wagner@intel.com>
| * Fix pthread compilation flagsDavid Wagner2014-10-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | According to the sem_init(3) manpage, we must pass the -pthread flag at link-time when using it. When using pthread_join(3), this flag must also be passed at compile time. The flags were wrong for libremote-processor and were missing for test-platform_host. Change-Id: Iec2797592d6d25297c87ceb2983e87e75624a576 Signed-off-by: David Wagner <david.wagner@intel.com>
* | Remove using std::XXX from headersSebastien Gonzalve2014-09-112-27/+27
|/ | | | | This is a bad practice to have using in headers because it pollutes the namespace of any user of that header.
* More README filesDavid Wagner2014-09-101-0/+33
| | | | | | | - More details in the root README.md file; add a nice diagram - Add a lot of README files in subdirectories Signed-off-by: David Wagner <david.wagner@intel.com>
* Add 3-clause BSD license to CMake makefiles.Mattijs Korpershoek2014-06-301-0/+28
| | | | | | | | | | | BZ: 207083 License headers were missing in CMake makefiles. This patch adds the 3-clause BSD license header to each CMakeLists.txt. Change-Id: Ia4da92e139e02d6348d655d0d88a16166d8431ca Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* Fix stlport includes in makefilesMattijs Korpershoek2014-06-301-5/+3
| | | | | | | | | | | | | | BZ: 207083 According to libstlport.mk, to use stlport for a given target, we shall "include external/stlport/libstlport.mk" in the target. This was not done in the parameter-framework's makefiles. This patch change all targets which require stlport to include it in the correct way. Change-Id: Ie9b75af6269f172ad6a6c753e15efd0c7baafdd9 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* Merge pull request #4 from kir0gawa/help-messagesDavid Wagner2014-06-251-6/+23
|\ | | | | Help messages
| * Implemented -h command for test-platformMattijs Korpershoek2014-03-071-6/+23
| | | | | | | | | | | | | | For new users, it was not very clear that you had to give an .xml to the test-platform executable This patch implements -h an explicits that
* | Fixed point test scriptMattijs Korpershoek2014-06-251-0/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 197723 This python script performs several checks on fixed point parameters: - Bound check: Can we set a value? - Sanity check: If we get this previously set parameter, is the value approximately the same? There should be at maximum a quantum difference between the original value and the returned value. - Consistency check: Can we set the value we got from the sanity check? - Bijectivity check: If we get the parameter we set a second time, is the result the same as the value we got from the set we did in the Sanity check? Change-Id: I7b4d61ec740139b0ee70a44b6b38009507a569ee Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* | Fixed point test configurationMattijs Korpershoek2014-06-254-0/+726
| | | | | | | | | | | | | | | | | | | | BZ: 197723 This contains the configuration files which contains a lot of fixedpoint parameters which can be used for testing. Change-Id: I261120d16eb6f4d28b6b61a5b2845f1fdc18e91f Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* | Test-platform enable/disable xml validationMattijs Korpershoek2014-06-251-0/+12
|/ | | | | | | | | | | | | | | | | | | | | | BZ: 184054 test-platform has no way to tell to the parameter framework that it wants the parameter framework to validate xmls on loading. New command added to test-platform executable. setValidateSchemasOnStart true|false If set to true, the parameter framework will try to validate the .xmls with the .xsds located next to them. If set to false, it will never attempt to validate. SetValidateSchemas is false by default to allow backward compatibility. Note(a): This assumes that the script is able to find the .xsd files (which should be in /tmp/Schemas/). Change-Id: I7a5b0bc09d31e6647d8c631380d31503666e7e7b Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* CMake: remove WIN32 commentsDavid Wagner2014-02-201-1/+1
| | | | | | | | | At the time of writing the makefiles, it wasn't clear what this argument was for. According to the documentation, it is only useful for GUI applications on windows. test-platform and remote-process are command-line tools and this does not apply. Signed-off-by: David Wagner <david.wagner@intel.com>
* CMake: beautification, fix some commentsDavid Wagner2014-02-181-4/+5
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>
* CMake: add installation instructionDavid Wagner2014-02-171-0/+2
| | | | | | | | | Run "cmake -DCMAKE_INSTALL_PREFIX=/path/to/install ." for choosing a custom prefix (optional: if it is not specified, a default directory will be chosen). Run "make install" for installing all generated files. Signed-off-by: David Wagner <david.wagner@intel.com>
* Add CMake MakefilesDavid Wagner2014-02-171-0/+12
| | | | | | | 1) Generate the Makefiles with "cmake"; 2) compile all targets with "make". Signed-off-by: David Wagner <david.wagner@intel.com>
* Import convert util templatesDavid Wagner2014-02-172-3/+3
| | | | | | Import an external dependency: a template-based conversion toolkit. Signed-off-by: David Wagner <david.wagner@intel.com>
* Remove some useless LOCAL_C_INCLUDES directivesDavid Wagner2014-02-131-1/+0
| | | | Signed-off-by: David Wagner <david.wagner@intel.com>
* Reintroduce hardcoded include pathsDavid Wagner2014-02-131-2/+2
| | | | | | | | | | Pathmaps for libxml2, stlport and icu4c are not defined in vanilla AOSP. As temporary fix for compilation on vanilla AOSP, we need to hardcode them again. Commit 55f41bcc3edf282f236539bb26bd6dc8638f235e introduced the use of include-path-for. Signed-off-by: David Wagner <david.wagner@intel.com>
* Change the license to 3-clause BSDDavid Wagner2014-02-134-57/+101
| | | | | | | Add license header in all source files and Makefiles, Add a "COPYING" file containing the license text. Signed-off-by: David Wagner <david.wagner@intel.com>
* Allow starting test-platform as a DaemonFrédéric Boisnard2014-02-123-16/+163
| | | | | | | | | | | | | | | | | | BZ: 151780 Currently, test-platform does not return when it is launched. In particular, one has to try to connect to it in order to know if it has correctly been initialized. Added a new '-d' option to test-platform to start it as a daemon: test-platform [-d] <file path> [port number, default 5001] When test-platform is started as a daemon, a child process is created and the main process immediatly returns its status. Change-Id: I70a33691909c958904cf50d156a563b998f92657 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Add Exit command to test-platformFrédéric Boisnard2014-02-123-9/+41
| | | | | | | | | | | | | BZ: 151780 The only way to exit test-platform is to kill it. However during the build process, the hostDomainGenerator.sh script needs to start and exit test-platform, without knowing its PID. Allow exiting the test-plaform though a new 'exit' command. Change-Id: Ifb94ea1c2017a0b23e25b42a06e2ceeae69ace89 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Fix typo in PFW when loading pluginsFrédéric Boisnard2014-02-121-1/+1
| | | | | | | | | | | | BZ: 151782 There is a typo in the error message when a plugin is not found (folowings instead of following). This patch updates the error message. Change-Id: Ifdb749fd90d646d0c04522874e879a329520de0f Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Clean useless extern "C" and wrong documentationKevin Rocard2014-02-121-10/+0
| | | | | | | | | | | | | | | | | BZ: 122982 Doxygen documentation was wrongly formated. An extern "C" was useless. Fix it. Change-Id: I1c144af30c692dc124bda90058f8caff1090ae3d Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/130520 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* Add the setFailureOnFailedSettingsLoad commandKevin Rocard2014-02-122-19/+47
| | | | | | | | | | | | | | | | | | | BZ: 122982 The failure on failed settings load option was added by the previous patch (Ifd3cd859ad0eaef266be4c9245ebd28c9e9c0a74) but not expose in test-platform. Create command to expose the boolean getters and setters of the ParameterMgrConector in a generic way. Change-Id: I438ab36c2d1141dc139d528f83b570f4d5078d19 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/119925 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>