aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Remove non ASCII char in tree representationKevin Rocard2014-10-021-18/+18
| | | | | | | | | | | Some comments representing a file tree were using non ASCII characters. They are not readable on many editors leading to incoherent display. Replace them by plain ASCII characters. Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
* More README filesDavid Wagner2014-09-103-5/+292
| | | | | | | - 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-302-0/+56
| | | | | | | | | | | 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>
* XmlValidator toolMattijs Korpershoek2014-06-253-0/+183
| | | | | | | | | | | | This tool can be used to validate a set of xml files against w3c schemas. It scans a directory recursively and checks for .xml files in it. For each file, it extracts the current schema file based on a convention (the corresponding schema file must have the same name as the root node) which is used in the parameter-framework. Change-Id: I27e32028e39a450ed18f86cb095348f73d59ade5
* Added cmake rules for installing tools in bin dirMattijs Korpershoek2014-06-251-0/+9
| | | | | | | | | When performing the tutorials, I wanted to use the tools/xmlGenerator/hostDomainGenerator.sh script. In order to do that, i had to copy manually my scripts files to the pfwInstalledDir/bin directory. This patchs completes the install target by copying the needed files
* Removed phony package to copy .xsd filesMattijs Korpershoek2014-06-251-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 192861 When hostDomainGenerator.sh is called by the build system, it needs to copy schema files to /tmp/tmp.XXXXXXX. This is because parameter-framework needs to have the schema files next to the .xml files in order to apply validation. In order to do that, hostDomainGenerator.sh needs to know where he can copy the .xsd files from. Currently, the .xsd files are copied from $HOST_OUT/etc/parameter-framework/Schemas via a dedicated makefile. This used a phony package to group all the files that have to be copied. The problem is that phony packages the phony package is not calling the prebuildt rules we need. So the files we want to export to /etc/parameter-framework/Schemas are not copied. This patch removes the phony package in order to produce the expected behaviour. Change-Id: I96da56f85a8c3d512fcfb97244181dc6c1cb9401 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* Updated hostDomainGenerator.sh schema validationMattijs Korpershoek2014-06-251-2/+23
| | | | | | | | | | | | | | | BZ: 188323 In order to validate xml files, we need the corresponding schemas to be next to the xml files. Those are put by the script in /tmp. This patch add the copying of the schema files to /tmp. I also adds an optional command line argument to disable/enable validation. This is useful for platform specific enabling/disabling validation. It can be used by calling hostDomainGenerator.sh --validate. Change-Id: I7da65f230e5abf5b1d18c5cd6cf11b67dae5ed76 Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* Add log in case of failureKevin Rocard2014-06-251-3/+13
| | | | | | | | | | | | | | BZ: 189977 The hostDomainGenerator.sh script generates xml files a build time. Sometimes it fails but the log information are no sufficient to found the root cause. Add some log information in order to be able to find it. Change-Id: I505577ee30503dccf25375b0ea262461ec4cce14 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
* Test-platform enable/disable xml validationMattijs Korpershoek2014-06-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* Fix "Argument list too long" bug during XML generationFrédéric Boisnard2014-06-231-2/+2
| | | | | | | | | | | | | | | | | BZ: 177060 When the initial XML file for tuning is too big, the XML generation fails with the message: "Argument list too long". This is because the generation relies on the PFW command "setDomainsWithSettingsXML", which takes XML data as string argument. There is a limitation concerning the size of this string, leading to the current issue. This patch replaces the call to "setDomainsWithSettingsXML" by "importDomainsWithSettingsXML", which takes a file as argument instead of a string. There is no limitation on the file size. Change-Id: Ieb12e6ba1391545021cd3f1e867dee0d28425d19 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Fix hostDomainGenerator.sh error about localhost socket creationFrédéric Boisnard2014-06-232-5/+5
| | | | | | | | | | | | | | | | | BZ: 171573 If localhost is not bound to 127.0.0.1, socket creation fails in the portAllocator.py script. This error is not well catched in the main tool hostDomainGenerator.sh. This patch updates portAllocator.py so that the IP address 127.0.0.1 is used instead of localhost. In addition, the potential error messages raised by portAllocator.py are now correctly taken into account by hostDomainGenerator.sh. HostDomainGenerator.sh has also been updated to replace all instances of 'localhost' by '127.0.0.1'. Change-Id: I7ed6ede7a1148360efac4bf38f49054066a50a29 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Change the license to 3-clause BSDDavid Wagner2014-02-1312-205/+305
| | | | | | | 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>
* Make hostDomainGenerator.sh verbose by defaultFrédéric Boisnard2014-02-121-4/+4
| | | | | | | | | | | | | BZ: 151780 The option --verbose must be provided in order to make hostDomainGenerator.sh verbose. However, this option is very usefull when the generation fails during a build, and it would be nice to have it enabled by default. Make this option the default one, and add a nonverbose option instead. Change-Id: I59195b7a28e25a5f18871d6baf2ae4f1310f49d7 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Fix hostDomainGenerator.sh concurrency issuesFrédéric Boisnard2014-02-123-60/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 151780 When multiple process run hostDomainGenerator.sh, some race conditions occur, despite current locking mechanism. In consequence, the script has been modified in order to make sure that available socket ports can be chosen for test-platform and PFW processes: - portAllocator.py: python script which creates a new socket using a random available port, and displays the port chosen. This port number is then pushed to the end of the available ports list by the system. - hostDomainGenerator.sh: uses portAllocator.py to get free ports for test-platform and the PFW. Fixed multiple issues as well: - When an error occur, a cleanup function was called and sometimes would kill concurrent processes. Now, only the test-platform and PFW instances started by the current hostDomainGenerator.sh script will be stopped, - Test-platform startup was not checked correctly, - The creation of the symlink to libremote-processor.so sometimes failed, leading to an early cleanup. Change-Id: I33b4b2ad5a6c2bbc6f8283222eb2f16f05286734 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Update xml generation scriptsFrancois Gaffie2014-02-122-4/+8
| | | | | | | | | | | | | | | | | BZ: 99956 XML scripts does not support empty tuning file. This patches updates XML generation scripts to support empty tuning file. Change-Id: I2d3e11a950524c468c78e3b99cdebf3538b9e053 Signed-off-by: Francois Gaffie <francois.gaffie@intel.com> Reviewed-on: http://android.intel.com:8080/138519 Reviewed-by: Quintero, Jorge <jorge.quintero@intel.com> Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com>
* [xml generation] Ignore errors in clean upKevin Rocard2014-02-121-4/+7
| | | | | | | | | | | | BZ: 152121 As the hostDomainGenerator clean up function can be called after any command, some clean commands were sometime irrelevant. Clean commands should not fail. Change-Id: I0e472919cd77abe393bca090a95d1c72cf77d58c Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
* Export lightRoutingUpdate for external buildKevin Rocard2014-02-121-0/+8
| | | | | | | | | | | | | | BZ: 145379 As the lightRoutingUpdate.sh script is in private, it is not exported for external release. As a result external clients can not use lightRoutingUpdate to generate xml from .pfw. Export lightRoutingUpdate to make it available in $ANDROID_HOST_OUT/system/bin after compilation. Change-Id: Id174ddb4dd0e31a7c5ede66e91b0db341745ff21 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
* hostDomainGenerator.sh: fix lock permissionsFrédéric Boisnard2014-02-121-1/+10
| | | | | | | | | | | | | | | | BZ: 149851 The hostDomainGenerator.sh script uses a lockfile to protect some operations from concurrent execution. This mechanism uses a file that is created if it does not already exist. In this case, the file permissions are too stricts, and other users are unable to run the script anymore. This patch changes the permission on the lockfile, allowing other users to access it. Change-Id: Iec250a4022cb8f97973fa92020b27dc0e83890c6 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Fix hostDomainGenerator socket-checking mechanism for Ubuntu 13.04Frédéric Boisnard2014-02-121-1/+1
| | | | | | | | | | | | | | | | | | BZ: 148729 The script hostDomainGenerator.sh doesn't work fine on Ubuntu 13.04. The processing is based on the external tool "ss" to monitor opened sockets, in order to check if existing instances of test-platform are currently started. It appears that the behavior of this tool is different in the latest Ubuntu release: requests of opened sockets always return multiple false results. In consequence, the script cannot find any available port to start a new test-platform instance. This patch updates the way opened sockets are checked, using "grep" instead of the "ss" filter mechanism. Change-Id: I2e1245c524d021d99389a0ec028105ed1f706666 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* Allow concurent generation of XML routing filesFrédéric Boisnard2014-02-121-0/+19
| | | | | | | | | | | | | | | | | | BZ: 145938 XML generation is impossible when multiple instances of the script hostDomainGeneration are run (this is typically the case with the current Android Make process). This is because the way the ports used to communicate with test-platform and parameter-framework are chosen is not protected agains concurrent executions. This patch protects the initialization of the test-platform and parameter-framework agains concurrent executions using a flock. In particular, it ensures that the ports chosen are reserved to a specific process. Change-Id: I3d8fee2b20313814c79f5390851ad57dc696cc28 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com>
* HostDomainGenerator: Do not try to use port if already in useKevin Rocard2014-02-121-0/+13
| | | | | | | | | | | | | | | | | | BZ: 144262 Currently, the hostDomainGenerator script doesn't check if the port used by the testPlatform is already used. This patch adds this new check. Change-Id: I323575f97f7437c01ce4e2d0b127aa658639af06 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/136085 Reviewed-by: Boisnard, FredericX <fredericx.boisnard@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* HostDomainGenerator: Fix relative linkKevin Rocard2014-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | BZ: 144262 Currently, the hostDomainGenrator doesn't handle well some relative links. This patch fixes the issue. Change-Id: I7289b98c4e367a880ce0eac9238693f80c540a3c Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/135931 Reviewed-by: Boisnard, FredericX <fredericx.boisnard@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gaio, MiguelX <miguelx.gaio@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* [Workaround] Force execution rightKevin Rocard2014-02-121-0/+7
| | | | | | | | | | | | | | | | BZ: 122982 The build system does not preserve execution right in external prebuild Add the execution rights witch chmod on executables. Change-Id: Ieac44050e80df0e0f83e1a6b947edc432ef00260 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/134359 Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* xml generation host script and makefileKevin Rocard2014-02-123-0/+242
| | | | | | | | | | | | | | | | | BZ: 122982 In order to generate the xml at build time, make has to launch an executable (bash script here) that will take care of all the process. This patch adds this script and the corresponding makefile. Change-Id: Ifb2a6374afd4c73283e3d2371548b069c1fa72a6 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/119957 Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: cactus <cactus@intel.com>
* XML generation pfw config file formatKevin Rocard2014-02-122-0/+89
| | | | | | | | | | | | | | | | | | BZ: 122982 In order to generate the xml at build time, pfw configuration file must be formated for simulation. This patch adds this script and the corresponding makefile. Change-Id: Ice404ec151b379dfd34d3a5c0b8a57f27d017356 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/132851 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> 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>
* Convert PFWScriptGenerator.py to python2Kevin Rocard2014-02-121-21/+23
| | | | | | | | | | | | | | | | | BZ: 122982 As python3 is not included in android build dependancy, PFWScriptGenerator.py could not be executed in the build process. Convert it to python2. Change-Id: I0e946534bde321d0a6567270b35a80ff3b38a551 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/130256 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>
* [xml generation] Update import commandKevin Rocard2014-02-121-1/+9
| | | | | | | | | | | | | | | | | | | | BZ: 116653 The command getDomainsXML was renamed to getDomainsWithSettingsXML. Use getDomainsWithSettingsXML instead of getDomainsXML as the default import command. Fallback on deprecated command getDomainsXML if the new command getDomainsWithSettingsXML does not exist. Change-Id: Ie16d7d5a27d998248cfefc628d3b99f83e64076a Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/113883 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Generate report from aplogsKevin Rocard2014-02-121-0/+121
| | | | | | | | | | | | | | | | | | | | | BZ: 115218 To generate a domain coverage report, one need to order the aplog in chronological order, parse them with coverage.py, giving the right options and generate the html report. Do all of those tasks in a simple-to-use script. Command example: ./aplog2coverage.sh -d domains.xml -eRouteManager aplog* -f -o report.html Change-Id: I6640f988b20c7115af91757ed83aa8febbcbd31f Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/114668 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Add a coverage translation to html xslt scriptKevin Rocard2014-02-121-0/+329
| | | | | | | | | | | | | | | | | | BZ: 115218 The coverage report generated is in xml, hard to read, file. Add an xslt script (and a css) to convert it to html in this new folder. Change-Id: Ic55a72e717c6b8bafa9d6a2e5e82af0d00317d0f Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112825 Reviewed-by: Graulle, JeremieX <jeremiex.graulle@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Remplace tabulation indentation by spacesKevin Rocard2014-02-121-726/+726
| | | | | | | | | | | | | | | | | | | BZ: 115218 The coding style request that file should be indented with spaces not tabs. Replaces each tab by 4 spaces. Change-Id: I15c665bf9a4feeff5512fba9e8c883c378f106a7 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/115316 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Move coverage generator in it's own folderKevin Rocard2014-02-121-0/+0
| | | | | | | | | | | | | | | | | | | | BZ: 115218 The coverage report generated script was in the tools folder. Other files will be used for coverage reports. Create a coverage folder in order to contain all coverage report utilities. Change-Id: I23ed75fb109cd4a5f6804398ef17d99e046fd49d Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/114667 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Create a root element with coverage attributesKevin Rocard2014-02-121-9/+8
| | | | | | | | | | | | | | | | | | | | BZ: 115218 The exported xml coverage report root element did not contain any attributes thus the total coverage was not outputted. Use the base export to xml - modified to use an existing node - to export the root element. Change-Id: I706a45159ae0af5a1b353f7776f62dab3c64f3f5 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/114695 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Lazy rule evaluationKevin Rocard2014-02-121-4/+7
| | | | | | | | | | | | | | | | | | BZ: 115218 The all and any rule were not lazy. This was a mismatch with the PFW. Make all and any compound rules lazy. Change-Id: If29e3b3f888be40ebf4027d318ae6017396d4d7b Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/114694 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [Coverage] Change coverage calculation algorithmKevin Rocard2014-02-121-10/+14
| | | | | | | | | | | | | | | | | | | | | BZ: 115218 The coverage was the number of children used divided by the number of children. This was a mistake as a child could have been used despite that all it's descendants might not have been. With this patch the coverage of an element is the coverage children average. Change-Id: I52c9990bec0ed006c70a27aa174898b96829baf5 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/114693 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Delete useless log message to gain performanceKevin Rocard2014-02-121-6/+1
| | | | | | | | | | | | | | | | | | | | | BZ: 115218 The __eq__ function is very used (1M time in my test), but cProfile showed that it was one of the most slow functions (in cumulate time). Delete useless log in the function in order to gain 90% performance (10s to 1s in cumulate time). Change-Id: I1ece15186cb30947f2c2af277cd0b326ea72c7ea Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112933 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Set the default error filter level to errorKevin Rocard2014-02-121-3/+3
| | | | | | | | | | | | | | | | | | | BZ: 115218 The default log filter level was set to warning or info, depending on the libraries availables. Set it always to error. Change-Id: I939165f881095798eea874c2c268cfffcf6187fe Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112715 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [coverage] Add flags to ignore errorsKevin Rocard2014-02-121-6/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | BZ: 115218 2 errors can be raised when parsing PFW logs: - criterion that change their state that is not allowed. The PFW allows an exclusive criterion to be in the none state. - configuration not applicable according to the criterion states that are however applied. It happens in case of log corruption (log lines missing). The user should be able to ignore those 2 errors if low coverage accuracy is allowed. Add the flags: --ignore-incoherent-criterion-state --ignore-ineligible-configuration-application Change-Id: I1a25b47a05e974d711b735e344f9352904c8771b Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112714 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [Coverage] Reset criterion on it's recreationKevin Rocard2014-02-121-1/+11
| | | | | | | | | | | | | | | | | | BZ: 115218 The script was not handling criterion recreation (usually on PFW restart). Reset criterion on it's recreation. Change-Id: I169717c1c62f89ce81b21909f3ee4b981d5e91d8 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112713 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [Coverage] Raise duplicated criterion specialised exceptionKevin Rocard2014-02-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | | BZ: 115218 When an element is requested to adopt multiple times the same element, the "DuplicatedChildError" exception is raised. However, in case of PFW restart, existing criteria are recreated, which is throwing the generic "DuplicatedChildError" exception. As such event need to be detected, specialise the "DuplicatedChildError" exception in "DuplicatedCriterionError" in order to catch the event easily. Change-Id: Ib0cca1d318233ca0b2f69fd277740ce8f5a550ad Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112712 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [Coverage] Support criterion incoherent stateKevin Rocard2014-02-121-11/+30
| | | | | | | | | | | | | | | | | | | | BZ: 115218 In case of incoherent log (corrupted), some transitions described in the log are not permitted by the internal criterion state machine. Resulting in raising an exception and stopping the program. Add an optional parameter to ignore integrity. Change-Id: I288c0e482b223aa0023e09fb158036b39d0ed8bf Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112711 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [Coverage] Move exception class in the relevant classKevin Rocard2014-02-121-13/+17
| | | | | | | | | | | | | | | | | | | BZ: 115218 Some exceptions were raised only by a particular class. As a result they were polluting the global namespace. Nested the exception class. Change-Id: Icde35d8d2f551a638b97d94bc0a770f70787c723 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112710 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [Coverage] Delete dangerous assert, raise exceptionKevin Rocard2014-02-121-2/+0
| | | | | | | | | | | | | | | | | | | | BZ: 115218 An assert was checking function input parameters that came from an input file. As a result an corrupted file would stop the program without the opportunity to catch the error. Remove the assert and let the function raise the appropriate exception. Change-Id: Ic8d8d318ca191040c546e354c0911d56670b1030 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112709 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* [Coverage] Delete useless bracketsKevin Rocard2014-02-121-4/+2
| | | | | | | | | | | | | | | | | | | BZ: 115218 Some brackets around return value were used to wrap lines that did not need to be wrapped. Unwrap lines and delete the brackets. Change-Id: I7583deff42b8b4db1ef7dbb61f24329dec908ec3 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/112708 Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: [xml generation] Change send command methodKevin Rocard2014-02-121-48/+57
| | | | | | | | | | | | | | | | | | | | BZ: 97960 The lightRoutingUpdate.sh script had bugs using adb shell commands. Push the generated script of board, then execute it remotly. Remove support for environement define pfw file and add support for multiple argument files. Change-Id: Ie43e1e2a4d3bc207a8704e7ca1a254dad74c9139 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/93371 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Wagner, David <david.wagner@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: [pfw parsor] Fix the useless quote added in rule commandsKevin Rocard2014-02-121-2/+2
| | | | | | | | | | | | | | | | | | | BZ: 97960 The ' in PFW rule command is useless. Delete it in script generator. Change-Id: Ifee9badbff1d6b0e1a564ed90e3a0e60cbf7b343 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/98368 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: De Chivre, Renaud <renaud.de.chivre@intel.com> Reviewed-by: Wagner, David <david.wagner@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: [PFW script generator] Rename sup* to *GroupKevin Rocard2014-02-121-3/+2
| | | | | | | | | | | | | | | | | | BZ: 97797 Need to support the new tags for supDomains and supConf Add domainGroup, confGroup and confType in corresponding match rules. Change-Id: Ia975e77dcd8f4e9c4f8d1a48e124ecdea0647375 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/99542 Reviewed-by: Wagner, David <david.wagner@intel.com> Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: [coverage] Support new log syntax & error handlingKevin Rocard2014-02-121-43/+62
| | | | | | | | | | | | | | | | | | | | BZ: 86781 Support of last change criterion syntax log, - old log line: Selection criterion changed event: (.*) = (.*) - new log line: Selection criterion changed event: Criterion name: (.*), current state: (.*) Change-Id: I626ca7e5dd6deb34fda041a6e9448012b7db62e1 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/91820 Reviewed-by: Wagner, David <david.wagner@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Barthes, FabienX <fabienx.barthes@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Support .pfw argument in lightRoutingUpdate.shKevin Rocard2014-02-121-16/+30
| | | | | | | | | | | | | | | | BZ: 86003 Adding an argument to lightRoutingUpdate.sh will overwrite the environement variable "PFWtest_DomainFile". Change-Id: Ia7447b9cb0d774bd91ec310874c0e6531ec0ea38 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/90087 Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Reviewed-by: cactus <cactus@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* PFW: Correct log level coverage scriptKevin Rocard2014-02-121-13/+31
| | | | | | | | | | | | | | BZ: 85983 Restrict debug log print to debug log level. Change-Id: I78bb79909502035247f410e9900a560190ee0ad5 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Reviewed-on: http://android.intel.com:8080/90085 Reviewed-by: Centelles, Sylvain <sylvain.centelles@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>
* sortAsound.conf.sh do not handle spacesFrédéric Boisnard2014-02-121-1/+1
| | | | | | | | | | | | | | | | | | BZ: 85879 This patch fixes a small bug in the sortAsound.conf.sh script, now it is allowed to have multiple spaces around the property 'value' for a hook in the asound.conf file. Change-Id: Iad3e51d4d56c371b5f7d57f333013f23d840a645 Signed-off-by: Frédéric Boisnard <fredericx.boisnard@intel.com> Reviewed-on: http://android.intel.com:8080/90959 Reviewed-by: cactus <cactus@intel.com> Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com> Reviewed-by: Rocard, KevinX <kevinx.rocard@intel.com> Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com> Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com> Reviewed-by: buildbot <buildbot@intel.com> Tested-by: buildbot <buildbot@intel.com>