geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r480292 - in /geronimo/genesis/trunk/build-harness/bin: collectreports collectreports.groovy
Date Tue, 28 Nov 2006 23:52:51 GMT
Author: jdillon
Date: Tue Nov 28 15:52:48 2006
New Revision: 480292

URL: http://svn.apache.org/viewvc?view=rev&rev=480292
Log:
Support to slurp up surefire reports

Added:
    geronimo/genesis/trunk/build-harness/bin/collectreports   (with props)
    geronimo/genesis/trunk/build-harness/bin/collectreports.groovy   (with props)

Added: geronimo/genesis/trunk/build-harness/bin/collectreports
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/collectreports?view=auto&rev=480292
==============================================================================
--- geronimo/genesis/trunk/build-harness/bin/collectreports (added)
+++ geronimo/genesis/trunk/build-harness/bin/collectreports Tue Nov 28 15:52:48 2006
@@ -0,0 +1,31 @@
+#!/bin/sh
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+##
+## $Rev$ $Date$
+##
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+. "$DIRNAME/groovy.shlib"
+
+groovy $@
+

Propchange: geronimo/genesis/trunk/build-harness/bin/collectreports
------------------------------------------------------------------------------
    svn:executable = *

Added: geronimo/genesis/trunk/build-harness/bin/collectreports.groovy
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/build-harness/bin/collectreports.groovy?view=auto&rev=480292
==============================================================================
--- geronimo/genesis/trunk/build-harness/bin/collectreports.groovy (added)
+++ geronimo/genesis/trunk/build-harness/bin/collectreports.groovy Tue Nov 28 15:52:48 2006
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//
+// $Rev$ $Date$
+//
+
+class ReportCollector
+    extends CliSupport
+{
+    def reportsdir = new File(basedir, "reports/surefire")
+    
+    def ReportCollector() {
+        // Enable emacs mode to disable [task] prefix on output
+        def p = ant.getAntProject()
+        p.getBuildListeners()[0].setEmacsMode(true)
+    }
+    
+    def main(args) {
+        def iter = args.toList().iterator()
+        def dir
+        
+        while (iter.hasNext()) {
+            def arg = iter.next()
+            
+            switch (arg) {
+                // HACK: Groovy's use of commons-cli eats up an '--' so need to use '---'
to skip
+                case '---':
+                    while (iter.hasNext()) {
+                        args.add(iter.next())
+                    }
+                    break
+                
+                default:
+                    if (dir != null) {
+                        throw new Exception("Unexpected argument: ${arg}")
+                    }
+                    dir = new File(arg)
+                    if (!dir.isAbsolute()) {
+                        dir = new File(basedir, arg)
+                    }
+                    break
+            }
+        }
+        
+        assert dir != null
+        
+        ant.mkdir(dir: reportsdir)
+        
+        ant.copy(todir: reportsdir, flatten: true) {
+            fileset(dir: dir) {
+                include(name: "**/target/surefire-reports/TEST-*.xml")
+            }
+        }
+    }
+}
+
+new ReportCollector().main(args)

Propchange: geronimo/genesis/trunk/build-harness/bin/collectreports.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/genesis/trunk/build-harness/bin/collectreports.groovy
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: geronimo/genesis/trunk/build-harness/bin/collectreports.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message