Difference between revisions of "NoLongerUsed.ContentsmovedToAnotherPage"
m (removed from category. This page should no longer be referenced from anywhere.)
m (David williams.acm.org moved page CBI/p2repoAnalyzers/Repo Reports Running Locally to NoLongerUsed.ContentsmovedToAnotherPage: noLongerUsedCombinedWithAnotherPage)
Latest revision as of 14:34, 17 October 2016
Running your own Repository Reports
This document gives a brief outline of how to run the "repo reports" locally, against a repository on your local file system.
There are some tests, that look at jars specifically, that require the jars to be on local file system and essentially use plain 'ol Java file IO and regex-type checks on the contents.
Another class of tests, read the content.jar/xml meta-data and reports on the data or relationships in that meta data.
Yet another, small class of tests, verify the jars are signed. These tests are not really "Java" or "workspace" related, but use Java's "exec" method to invoke "jarsigner -verify" on multiple threads, on a directory of jars. (There is actually a faster heuristic in the code that simply looks for the presence of the Eclipse signature file, but that is a heuristic and might not always be accurate, so it not used by default).
Running the repo tests
These instructions are focus for "running from your workspace", but could also easily be done "from the command line" if you know how to run Eclipse Applications from the command line.
The Eclipse Application is named 'org.eclipse.cbi.p2repo.analyzers.repoReport'. It takes two "system properties"; one to specify where you want the output to go, and another to specify where the repository-to-analyze is on the file system. An optional third parameter names a repository to use as reference for the "version check" reports. For example:
There is another parameter, -DuseNewApi=true which is not yet documented (bug 487409) but runs the code in such a way that tests pass, fail, or give a warning, and produces compact, color coded table of results, to link to an experimental example.
The source project is named 'org.eclipse.cbi.p2repo.analyzers' and is currently in Git in repository named 'cbi/org.eclipse.cbi.p2repo.analyzers.git'. See org.eclipse.cbi.p2repo.analyzers.git (browse, stats, fork on OrionHub) .
Once you load that project into your workspace, it will include one "launch configuration" that can be used as a starting example, edited and used to launch the application from your workspace.
On a large repository, it take 5 or 10 minutes to complete, and then you just look at the results (usually) with a web browser starting with the 'index.html' at the location you specified in 'reportOutputDir' property.
For one example of a bash script that takes advantage of a "product build" to run the report application, see the example in the Eclipse Platform Git repository named createReports.sh.
For an example of installing as a feature from a p2 repository see the 'installTestsFromRepo' target in the SimRel build.xml file. And then, see the actual running of the tests in the 'runReports' target in the SimRel runTests.xml file.
Getting help or making contributions
You can ask questions on cross-project list if the tests do not work as expected. Or, even better, you can make improvements/fixes directly on this wiki, if the instructions can be better. Feel free to supply patches on the cross-project component in bugzilla.