Permalink
Browse files

Add a number of other metrics about CI vs packags

  • Loading branch information...
1 parent 4325fdb commit f802d0a4bde32eafa6f6b9bbf44b0bc486e3509f @CloCkWeRX committed Jan 4, 2012
Showing with 52 additions and 0 deletions.
  1. +52 −0 admin-misplaced.php
View
@@ -53,11 +53,38 @@
$document = simplexml_load_string((string)$tidy);
$document->registerXPathNamespace('xhtml', "http://www.w3.org/1999/xhtml");
$qa_package_links = $document->xpath('//xhtml:tr[2]/xhtml:td[1]/xhtml:ul/xhtml:li/xhtml:a');
+
foreach ($qa_package_links as $node) {
$orphan_packages[] = (string)$node;
}
}
+$jenkins_qa_packages = array();
+$document = simplexml_load_file('http://test.pear.php.net:8080/view/Unmaintained%20QA%20packages/rssAll');
+$document->registerXPathNamespace('atom', 'http://www.w3.org/2005/Atom');
+$links = $document->xpath('//atom:link');
+
+foreach ($links as $link) {
+ // Example content:
+ // http://test.pear.php.net:8080/job/File_SearchReplace/11/
+ list(,,,$jenkins_qa_package) = explode("/", (string)$link["href"]);
+
+ $jenkins_qa_packages[] = $jenkins_qa_package;
+}
+
+$jenkins_packages = array();
+$document = simplexml_load_file('http://test.pear.php.net:8080/rssAll');
+$document->registerXPathNamespace('atom', 'http://www.w3.org/2005/Atom');
+$links = $document->xpath('//atom:link');
+
+foreach ($links as $link) {
+ // Example content:
+ // http://test.pear.php.net:8080/job/File_SearchReplace/11/
+ list(,,,$jenkins_package) = explode("/", (string)$link["href"]);
+
+ $jenkins_packages[] = $jenkins_package;
+}
+
/*
* Show results.
*/
@@ -109,3 +136,28 @@
echo implode("\n", $anomalies);
echo "\n";
}
+
+
+$anomalies = array_diff($orphan_packages, $jenkins_qa_packages);
+if ($anomalies) {
+ echo "---------------\n";
+ echo "Orphan packages not on jenkins' unmaintained list:\n";
+ echo implode("\n", $anomalies);
+ echo "\n";
+}
+
+$anomalies = array_diff($github, $jenkins_packages);
+if ($anomalies) {
+ echo "---------------\n";
+ echo "Github packages not on jenkins:\n";
+ echo implode("\n", $anomalies);
+ echo "\n";
+}
+
+$anomalies = array_diff($packages_all, $jenkins_packages);
+if ($anomalies) {
+ echo "---------------\n";
+ echo "PEAR packages not on jenkins:\n";
+ echo implode("\n", $anomalies);
+ echo "\n";
+}

0 comments on commit f802d0a

Please sign in to comment.