clerezza-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [3/4] clerezza git commit: CLEREZZA-995: removed integrationtest.web project
Date Mon, 01 Jun 2015 17:08:30 GMT
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java
b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java
deleted file mode 100644
index ecfc6b6..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * @author hasan, reto
- *
- * @since version 0.1
- */
-public class ResultsLogger {
-
-    AbnormalTeminationNotificator notificator;
-    
-    private List<ExceptionDescription> exeptionDescriptionList = new ArrayList<ExceptionDescription>();

-
-    private PrintWriter printWriter;
-    /**
-     * the prefix of report files' name
-     */
-    private static final String REPORT_FILEPRFX = "testresults-";
-    /**
-     * the suffix of report files' name
-     */
-    private static final String REPORT_FILESUFX = ".txt";
-    /**
-     * maps a TestThread to its statistics data
-     */
-    private Map<TestThread, TestStatistics> testThreadStatistics = 
-            new HashMap<TestThread, TestStatistics>();
-
-    final Logger logger = LoggerFactory.getLogger(ResultsLogger.class);
-
-    ResultsLogger(String resultsDirectory, AbnormalTeminationNotificator notificator) {
-        this.notificator = notificator;
-        printWriter = null;
-
-        try {
-            String index = getNextIndex(resultsDirectory);
-            String fname = resultsDirectory + "/" + REPORT_FILEPRFX + index + ".txt";
-            logger.info("ResultsLogger: test results stored into {}", fname);
-            File f = new File(fname);
-            if (!f.exists()) {
-                f.createNewFile();
-            }
-            printWriter = new PrintWriter(new FileWriter(f, true));
-        } catch (IOException ex) {
-            throw new RuntimeException(ex);
-        }
-    }
-
-    /**
-     * gets the next index to be used as part of the filename for storing 
-     * test results
-     * 
-     * @param resultsDirectory the directory for storing test results
-     * @return index for the new file to store test results
-     */
-    private String getNextIndex(String resultsDirectory) {
-        File dir = new File(resultsDirectory);
-
-        FilenameFilter filter = new FilenameFilter() {
-
-            @Override
-            public boolean accept(File dir, String name) {
-                return name.startsWith(REPORT_FILEPRFX) &&
-                        name.endsWith(REPORT_FILESUFX);
-            }
-        };
-
-        String[] children = dir.list(filter);
-
-        if (children == null) { // Either dir does not exist or is not a directory or is
not readable
-            if (dir.isFile()) {
-                throw new RuntimeException(resultsDirectory +
-                        " already exists as a file");
-            }
-            if (dir.exists()) {
-                if (!dir.canRead()) {
-                    throw new RuntimeException("Cannot read directory " +
-                            resultsDirectory);
-                }
-            } else {
-                if (!dir.mkdir()) {
-                    throw new RuntimeException("Cannot create directory " +
-                            resultsDirectory);
-                }
-            }
-            return "1";
-        } else {
-            int max = 0;
-            for (int i = 0; i < children.length; i++) {
-                // Get filename of file
-                String filename = children[i];
-                String strIndex = filename.substring(REPORT_FILEPRFX.length(),
-                        filename.length() - REPORT_FILESUFX.length());
-                int idx = Integer.parseInt(strIndex);
-                if (max < idx) {
-                    max = idx;
-                }
-            }
-            return String.valueOf(++max);
-        }
-    }
-
-    /**
-     * logs results of a TestThread
-     * updates TestStatistics of this TestThread
-     * 
-     * @param timeInNanos elapsed time measured by the TestThread
-     * @param test the TestThread
-     */
-    synchronized void logResult(long timeInNanos, TestThread test) {
-        TestStatistics testStatistics = getTestStatistics(test);
-        testStatistics.newTestValue(timeInNanos);
-
-        printWriter.print(test.getName());
-        printWriter.print("\t");
-        printWriter.print(timeInNanos);
-        printWriter.println("\tns");
-        printWriter.flush();
-    }
-    
-    synchronized void logException(long timeInNanos, TestThread testThread, RuntimeException
exception) {
-        exeptionDescriptionList.add(new ExceptionDescription(timeInNanos, testThread, exception));
-    }
-
-    /**
-     * returns an instance of a TestStatistics for the given TestThread
-     * creates a new instance if none has been assigned to this TestThread
-     * 
-     * @param test TestThread whose information is to be logged
-     * @return the TestStatistics assigned to this TestThread
-     */
-    private TestStatistics getTestStatistics(TestThread test) {
-        TestStatistics testStatistics = testThreadStatistics.get(test);
-        if (testStatistics == null) {
-            testStatistics = new TestStatistics();
-            testThreadStatistics.put(test, testStatistics);
-        }
-        return testStatistics;
-    }
-
-    /**
-     * this method prints all TestStatistics and then close the writer
-     */
-    void close() {
-        Set<TestThread> testThreads = testThreadStatistics.keySet();
-        TestStatistics testStatistics;
-        printWriter.println("# Test Statistics:");
-        for (TestThread tt : testThreads) {
-            testStatistics = testThreadStatistics.get(tt);
-            printWriter.print(tt.getName());
-            printWriter.print("\t");
-            printWriter.print(testStatistics.getMax());
-            printWriter.print("\tns\t");
-            printWriter.print(testStatistics.getMin());
-            printWriter.print("\tns\t");
-            printWriter.print(testStatistics.getSum() / testStatistics.getSize());
-            printWriter.println("\tns");
-        }
-        if (exeptionDescriptionList.size() == 0) {
-            printWriter.print("# Test regularly terminated at: ");
-        } else {
-            printWriter.print("# Test terminated after exception at: ");
-            notifyAbnormalTemination();
-        }
-        printWriter.println(new Date());
-        printExceptions();
-        printWriter.close();
-    }
-
-    private void notifyAbnormalTemination() {
-        if (notificator != null) {
-            printWriter.println("Sending notification...");
-            try {
-                notificator.notifyAbnormalTermination(exeptionDescriptionList);
-            } catch (RuntimeException ex) {
-                printWriter.println();
-                printWriter.println("###ERROR### Couldn't send notification:");
-                ex.printStackTrace(printWriter);
-                printWriter.println("###");
-            }
-        }
-        
-    }
-
-    private void printExceptions() {
-        for (ExceptionDescription exceptionDescription : exeptionDescriptionList) {
-            printExceptionDescription(exceptionDescription);
-        }
-        
-    }
-
-    private void printExceptionDescription(
-            ExceptionDescription exceptionDescription) {
-        printWriter.print("The test-thread ");
-        printWriter.print(exceptionDescription.getTestThread().getName());
-        printWriter.print(" got a ");
-        printWriter.print(exceptionDescription.getException().getClass().getName());
-        printWriter.print(" after ");
-        printWriter.print(exceptionDescription.getTimeInNanos());
-        printWriter.println(" ns");
-        exceptionDescription.getException().printStackTrace(printWriter);
-        
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java
b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java
deleted file mode 100644
index ee460ac..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-/**
- * An object of this class stores the minimum, maximum, sum, and size of
- * a set of test values.
- * Each time a new test value is reported it determines the new minimum, 
- * maximum, sum, and size.
- * The test values themselves are however not stored.
- *
- * @author hasan
- * 
- * @since version 0.1
- */
-
-class TestStatistics {
-
-    private long min;
-    private long max;
-    private long sum = 0;
-    private long size = 0;
-
-    long getMax() {
-        return max;
-    }
-
-    long getMin() {
-        return min;
-    }
-
-    long getSize() {
-        return size;
-    }
-
-    long getSum() {
-        return sum;
-    }
-
-    void newTestValue(long value) {
-        if (size == 0) {
-            min = value;
-            max = value;
-        } else {
-            if (max < value) {
-                max = value;
-            }
-            if (min > value) {
-                min = value;
-            }
-        }
-        sum += value;
-        size++;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java
b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java
deleted file mode 100644
index 2c79f91..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-/**
- *
- * @author hasan, reto
- * 
- * @since version 0.1
- */
-class TestThread extends Thread {
-
-    /**
-     * the WebTestCase whose run method is to be executed by this thread
-     */
-    private WebTestCase wtc;
-    /**
-     * the time required (in nanoseconds) to execute the run method of 
-     * a WebTestCase
-     */
-    private long elapsedTime;
-    private ResultsLogger resultsLogger;
-    private boolean stopRequested = false;
-    private long loopSleepTime; // ms
-    private WebIntegrationTestFramework webIntegrationTestFramework;
-    
-    TestThread(String threadName, WebTestCase wtc, WebIntegrationTestFramework webIntegrationTestFramework,
ResultsLogger resultsLogger,
-            long loopSleepTime) {
-        super(threadName);
-        this.wtc = wtc;
-        this.webIntegrationTestFramework = webIntegrationTestFramework;
-        this.resultsLogger = resultsLogger;
-        this.loopSleepTime = loopSleepTime;
-    }
-
-    /**
-     * this method repeatedly executes the run method of the registered 
-     * WebTestCase and measures the elapsed time.
-     * repetition is done until stop is requested.
-     * 
-     * @see WebTestCase#run()
-     * @see #requestStop()
-     */
-    @Override
-    public void run() {
-        try {
-            while (!stopRequested) {
-                long startTime = System.nanoTime();
-                try {
-                    wtc.run();
-                    webIntegrationTestFramework.incrementIterationCounter();
-                } catch (RuntimeException ex) {
-                    elapsedTime = System.nanoTime() - startTime;
-                    resultsLogger.logException(elapsedTime, this, ex);
-                    webIntegrationTestFramework.requestThreadsStop();
-                    break;
-                }
-                elapsedTime = System.nanoTime() - startTime;
-                resultsLogger.logResult(elapsedTime, this);
-
-                try {
-                    sleep(loopSleepTime);
-                } catch (InterruptedException ex) {
-                    ex.printStackTrace();
-                }
-            }
-        } finally {
-            webIntegrationTestFramework.notifyThreadFinishing(this);
-        }
-    }
-
-    /**
-     * this method is used to stop this thread
-     * 
-     * @see #run() 
-     */
-    void requestStop() {
-        stopRequested = true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java
b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java
deleted file mode 100644
index d952b3e..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An instance of this class is responsible for running all {@link WebTestCase}S
- * which implement the service as referred below.
- * 
- * @scr.component
- * @scr.reference name="WebTestCase"
- *        cardinality="1..n" policy="static"
- *        interface="org.apache.clerezza.integrationtest.web.framework.WebTestCase"
- * 
- * @author hasan, reto
- * 
- * @since version 0.1
- */
-public class WebIntegrationTestFramework {
-
-    private Set<ServiceReference> boundTestCases = new HashSet<ServiceReference>();
-    private Set<TestThread> allTestThreads = new HashSet<TestThread>();
-    private Set<TestThread> runningTestThreads = new HashSet<TestThread>();
-    private ResultsLogger resultsLogger;
-    /**
-     * Service property
-     * 
-     * @scr.property value="http://localhost:8080"
-     *    description="Specifies the URI prefix of the subject under test."
-     */
-    public static final String SUBJECT_UNDER_TEST = "subjectUnderTest";
-    /**
-     * Service property
-     * 
-     * @scr.property value="testresults"
-     *    description="Specifies the directory to place result log files."
-     */
-    public static final String TEST_RESULTS_DIR = "testResultsDirectory";
-    /**
-     * Service property
-     * 
-     * @scr.property type="Long" value="0"
-     *    description="Specifies the break time in ms before executing the next iteration."
-     */
-    public static final String ITER_BREAK_TIME = "iterationBreakTime";
-    
-    /**
-     * Service property
-     * 
-     * @scr.property type="Long" value="100"
-     *    description="Specifies after how many iterations the Garbage Collection is run."
-     */
-    public static final String GC_FREQUENCY = "gcFrequency";
-    private long gcFrequency = 100;
-    private long iterationCounter = 0;
-    
-    /**
-     * @scr.reference cardinality=0..1
-     */
-    AbnormalTeminationNotificator notificator;
-    final Logger logger = LoggerFactory.getLogger(WebIntegrationTestFramework.class);
-
-    synchronized protected void incrementIterationCounter() {
-        if(++iterationCounter == gcFrequency) {
-            iterationCounter = 0;
-            System.gc();
-        }
-    }
-    
-    protected void bindWebTestCase(ServiceReference serviceReference) {
-        logger.info("Binding {}", serviceReference.toString());
-        boundTestCases.add(serviceReference);
-    }
-
-    protected void unbindWebTestCase(ServiceReference serviceReference) {
-        logger.info("Unbinding {}", serviceReference.toString());
-        boundTestCases.remove(serviceReference);
-    }
-
-    protected void activate(ComponentContext componentContext) {
-        logger.info("Activating WebIntegrationTestFramework");
-        final String resultsDirectory = (String) componentContext.getProperties().get(TEST_RESULTS_DIR);
-        resultsLogger = new ResultsLogger(resultsDirectory, notificator);
-        final String subjectUnderTest = (String) componentContext.getProperties().get(SUBJECT_UNDER_TEST);
-
-        final long iterationBreakTime = (Long) componentContext.getProperties().get(ITER_BREAK_TIME);
-        
-        gcFrequency = (Long) componentContext.getProperties().get(GC_FREQUENCY);
-        
-        for (ServiceReference serviceRef : boundTestCases) {
-            WebTestCase wtc = (WebTestCase) componentContext.locateService("WebTestCase",
serviceRef);
-            wtc.init(subjectUnderTest);
-
-            String testCaseName = wtc.getClass().getSimpleName();
-            int threadCount = 1;
-            if (wtc.multiThreadingCapable()) {
-                threadCount = (Integer) serviceRef.getProperty("threadCount");
-            }
-            logger.info("WebIntegrationTestFramework: {} threads to execute {}", threadCount,
testCaseName);
-            for (int i = 0; i < threadCount; i++) {
-                TestThread testCaseThread =
-                        new TestThread(testCaseName + "-" + i, wtc, this, resultsLogger,
-                        iterationBreakTime);
-                allTestThreads.add(testCaseThread);
-            }
-        }
-        for (TestThread th : allTestThreads) {
-            th.start();
-            runningTestThreads.add(th);
-        }
-    }
-
-    protected void deactivate(ComponentContext componentContext) {
-        logger.info("Deactivating WebIntegrationTestFramework");
-        requestThreadsStop();
-        for (TestThread th : allTestThreads) {
-            try {
-                th.join();
-            } catch (InterruptedException ex) {
-                ex.printStackTrace();
-            }
-        }
-    }
-
-    void notifyThreadFinishing(TestThread thread) {
-        runningTestThreads.remove(thread);
-        if (runningTestThreads.size() == 0) {
-            resultsLogger.close();
-        }
-    }
-
-    void requestThreadsStop() {
-        for (TestThread th : allTestThreads) {
-            th.requestStop();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java
b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java
deleted file mode 100644
index ac7a610..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-/**
- *
- * @author hasan
- * 
- * @since version 0.1
- */
-public interface WebTestCase {
-
-    /**
-     * This method is called to allow a WebTestCase to do some initialization
-     * tasks prior to the run method being called
-     * 
-     * @param testSubjectUriPrefix the URI prefix of the subject under test.
-     */
-    public void init(String testSubjectUriPrefix);
-
-    /**
-     * This method performs the actual test and can throw a RuntimeException.
-     * 
-     */
-    public void run();
-
-    /**
-     * This method determines whether it is allowed to have several threads 
-     * running in parallel executing the run method of this WebTestCase.
-     * 
-     * If an implementation returns true, it MUST provide a configurable
-     * <code>@scr.property</code> named "threadCount" and of type Integer.
-     */
-    public boolean multiThreadingCapable();
-}

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/testing-screenrc
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/testing-screenrc b/integrationtest.web/src/main/shell/testing-screenrc
deleted file mode 100644
index c3671fd..0000000
--- a/integrationtest.web/src/main/shell/testing-screenrc
+++ /dev/null
@@ -1,122 +0,0 @@
-# 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.
-#
-# /etc/screenrc
-#
-#   This is the system wide screenrc.
-#
-#   You can use this file to change the default behavior of screen system wide
-#   or copy it to ~/.screenrc and use it as a starting point for your own
-#   settings.
-#
-#   Commands in this file are used to set options, bind screen functions to
-#   keys, redefine terminal capabilities, and to automatically establish one or
-#   more windows at the beginning of your screen session.
-#
-#   This is not a comprehensive list of options, look at the screen manual for
-#   details on everything that you can put in this file.
-#
-
-# ------------------------------------------------------------------------------
-# SCREEN SETTINGS
-# ------------------------------------------------------------------------------
-
-startup_message off
-#nethack on
-
-#defflow on # will force screen to process ^S/^Q
-deflogin on
-#autodetach off
-
-# turn visual bell on
-vbell off
-vbell_msg "   Wuff  ----  Wuff!!  "
-
-# define a bigger scrollback, default is 100 lines
-defscrollback 1024
-
-# ------------------------------------------------------------------------------
-# SCREEN KEYBINDINGS
-# ------------------------------------------------------------------------------
-
-# Remove some stupid / dangerous key bindings
-bind ^k
-#bind L
-bind ^\
-# Make them better
-bind \\ quit
-bind K kill
-bind I login on
-bind O login off
-bind } history
-
-# An example of a "screen scraper" which will launch urlview on the current
-# screen window
-#
-#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"
-
-# ------------------------------------------------------------------------------
-# TERMINAL SETTINGS
-# ------------------------------------------------------------------------------
-
-# The vt100 description does not mention "dl". *sigh*
-termcapinfo vt100 dl=5\E[M
-
-# turn sending of screen messages to hardstatus off
-hardstatus off
-# Set the hardstatus prop on gui terms to set the titlebar/icon title
-termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
-# use this for the hard status string
-#hardstatus string "%h%? users: %u%?"
-
-hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y
%c:%s%{-}'
-
-# An alternative hardstatus to display a bar at the bottom listing the
-# windownames and highlighting the current windowname in blue. (This is only
-# enabled if there is no hardstatus setting for your terminal)
-#
-#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
-
-hardstatus alwayslastline
-
-# set these terminals up to be 'optimal' instead of vt100
-termcapinfo xterm*|linux*|rxvt*|Eterm* OP
-
-# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
-# (This fixes the "Aborted because of window size change" konsole symptoms found
-#  in bug #134198)
-termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
-
-# To get screen to add lines to xterm's scrollback buffer, uncomment the
-# following termcapinfo line which tells xterm to use the normal screen buffer
-# (which has scrollback), not the alternate screen buffer.
-#
-#termcapinfo xterm|xterms|xs|rxvt ti@:te@
-
-# ------------------------------------------------------------------------------
-# STARTUP SCREENS
-# ------------------------------------------------------------------------------
-
-# Example of automatically running some programs in windows on screen startup.
-#
-#   The following will open top in the first window, an ssh session to monkey
-#   in the next window, and then open mutt and tail in windows 8 and 9
-#   respectively.
-#
-# screen top
-# screen -t monkey ssh monkey
-# screen -t mail 8 mutt
-# screen -t daemon 9 tail -f /var/log/daemon.log
-

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/tx-getlatestframework
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/tx-getlatestframework b/integrationtest.web/src/main/shell/tx-getlatestframework
deleted file mode 100755
index 098f1d8..0000000
--- a/integrationtest.web/src/main/shell/tx-getlatestframework
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-#-------------------------------------------------------------------------------
-# This script downloads the latest sversion of org.apache.clerezza.integrationtest.web
-# and org.apache.clerezza.integrationtest.web.performance
-#-------------------------------------------------------------------------------
-# Author: daniel.spicar@clerezza.org
-#-------------------------------------------------------------------------------
-# Requirements:	curl, wget, bash
-#-------------------------------------------------------------------------------
-
-# error codes
-NO_ERROR=0
-DOWNLOAD_FAILED=1
-BAD_ARGUMENTS=2
-REQUIREMENTS_NOT_FULFILLED=3
-NOT_DOWNLOADED=4
-
-command_test=$(whatis "curl" | grep 'nothing appropriate')
-if [ -n "$command_test" ]; then
-	echo "curl not found.";	
-	exit $REQUIREMENTS_NOT_FULFILLED
-fi
-command_test=$(whatis "wget" | grep 'nothing appropriate')
-if [ -n "$command_test" ]; then
-	echo "wget not found.";	
-	exit $REQUIREMENTS_NOT_FULFILLED
-fi
-
-# global vars
-BIN_URI_FRAMEWORK=http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.integrationtest.web/
-BIN_URI_FRAMEWORK_RELEASE=`echo $BIN_URI_FRAMEWORK | sed 's/snapshot/release/'`
-BIN_URI_PERFORMANCETEST=http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.integrationtest.web.performance/
-BIN_URI_PERFORMANCETEST_RELEASE=`echo $BIN_URI_PERFORMANCETEST | sed 's/snapshot/release/'`
-LIB_DIR=`pwd`
-
-# Prints the usage message
-print_usage()
-{
-	echo "Usage: tx-getlatestframework [<output-directory> <framework-repo-uri>
<performancetest-repo-uri>]"
-}
-
-# Checks whether the supplied file is present in LIB_DIR
-# Args: file
-check_file()
-{
-	local file
-
-	if [ $# -eq 1 ]; then
-		file=$1
-	else
-		return $BAD_ARGUMENTS;
-	fi
-
-	if [ -e $LIB_DIR/$file ]; then
-		return 0
-	else
-		return 1
-	fi
-}
-
-# Downloads the specified binary. Requires exactly 3 arguments.
-# Args: uri
-#		directory
-#		file
-download_bin()
-{
-	local uri
-	local dir
-	local file
-
-	if [ $# -eq 3 ]; then
-		uri=$1
-		dir=$2
-		file=$3
-	else
-		return $BAD_ARGUMENTS;
-	fi
-	
-	if `check_file $file`; then
-		echo "the most recent file is $LIB_DIR/$file and it is already downloaded."
-		return $NOT_DOWNLOADED
-	else
-		if wget -O $LIB_DIR/$file $uri$dir$file ; then
-			return $NO_ERROR
-		fi
-	fi
-
-	return $DOWNLOAD_FAILED
-}
-
-# Checks if the first the first supplied version is higher than the second.
-# Syntax: Versions are interpreted as follows: major_version.minor_version
-# Example: to compare if 0.10 is larger than 0.9, the arguments are: 0 10 0 9
-#
-# NOTE: Same versions return true as well. 
-# 		This means the first argument is prioritized.
-#
-# Args: major_version_first
-#		minor_version_first
-#		major_version_second
-#		minor_version_second
-is_higher_version()
-{
-	if [ $# -ne 4 ]; then
-		return $BAD_ARGUMENTS
-	fi
-
-	if [ $1 -gt $3 ]; then
-		return 0
-	else
-		if [ $1 -eq $3 ]; then
-			if [ $2 -ge $4 ]; then
-				return 0
-			fi
-		fi	
-	fi
-
-	return 1
-}
-
-# Get the latest binary.
-# Args: uri
-#		uri_release
-# Returns: An array with latest_uri latest_dir latest_file in that order.
-get_latest_version()
-{
-	if [ $# -ne 2 ]; then
-		return $BAD_ARGUMENTS
-	fi
-
-	local uri
-	local uri_release
-	local major_version_release
-	local minor_version_release
-	local major_version_snapshot
-	local minor_version_snapshot
-	local major_version
-	local minor_version
-
-	uri=$1
-	uri_release=$2
-	major_version_release=-1
-	minor_version_release=-1
-	for line in `curl $uri_release 2> /dev/null | sed 's/^.*\">//;s/<\/a.*$//;1,/Parent
Directory/d;/^[^0-9]/,$d;'`; do		
-		major_version=`echo $line | sed 's/\.[0-9]\+\///'`
-		minor_version=`echo $line | sed 's/\///;s/^[0-9]\+\.//'`
-		if `is_higher_version $major_version $minor_version $major_version_release $minor_version_release`;
then
-			major_version_release=$major_version
-			minor_version_release=$minor_version
-			latest_dir_release=$line
-		fi		
-	done
-
-	major_version_snapshot=-1
-	minor_version_snapshot=-1
-	for line in `curl $uri 2> /dev/null | sed 's/^.*\">//;s/<\/a.*$//;1,/Parent Directory/d;/^[^0-9]/,$d;'`;
do
-		major_version=`echo $line | sed 's/\.[0-9]\+-SNAPSHOT\///'`
-		minor_version=`echo $line | sed 's/-SNAPSHOT\///;s/^[0-9]\+\.//'`
-		if `is_higher_version $major_version $minor_version $major_version_snapshot $minor_version_snapshot`;
then
-			major_version_snapshot=$major_version
-			minor_version_snapshot=$minor_version
-			latest_dir=$line
-		fi	
-	done
-
-	if `is_higher_version $major_version_release $minor_version_release $major_version_snapshot
$minor_version_snapshot`; then
-		latest_dir=$latest_dir_release
-		uri=$uri_release
-	fi
-
-	for line in `curl $uri$latest_dir 2> /dev/null | sed '1,/<a href=\"o/d;/<hr>/,$d;/\.jar</!d;/sources/d;s/^
*<a href=\"//;s/\">.*$//'`; do
-        latest_file=$line
-	done
-
-	local ret
-	ret=( $uri $latest_dir $latest_file )
-	echo ${ret[@]}
-}
-
-# main script
-# Argument handling
-if [ $# -lt 4 ]; then	
-	if [ $# -ge 1 ]; then
-		case $1 in
-			-*)  print_usage; exit $NO_ERROR;;			
-			*)   LIB_DIR=$1;;
-		esac
-	fi
-	if [ $# -ge 2 ]; then
-		BIN_URI_FRAMEWORK=$2
-		BIN_URI_FRAMEWORK_RELEASE=`echo $BIN_URI_FRAMEWORK | sed 's/snapshot/release/'`
-	fi
-	if [ $# -eq 3 ]; then
-		BIN_URI_PERFORMANCETEST=$3
-		BIN_URI_PERFORMANCETEST_RELEASE=`echo $BIN_URI_PERFORMANCETEST | sed 's/snapshot/release/'`
-	fi
-else
-	echo "Too many arguments!"
-	print_usage
-	exit $BAD_ARGUMETNS
-fi
-
-
-latest_version=( `get_latest_version $BIN_URI_FRAMEWORK $BIN_URI_FRAMEWORK_RELEASE` )
-echo ${latest_version[@]}
-download_bin ${latest_version[@]}
-latest_version=( `get_latest_version $BIN_URI_PERFORMANCETEST $BIN_URI_PERFORMANCETEST_RELEASE`
)
-download_bin ${latest_version[@]}
-exit $?

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/tx-go-to-screen.sh
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/tx-go-to-screen.sh b/integrationtest.web/src/main/shell/tx-go-to-screen.sh
deleted file mode 100755
index d4b7638..0000000
--- a/integrationtest.web/src/main/shell/tx-go-to-screen.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/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.
-#
-#
-
-print_usage()
-{
-        echo "usage: tx-go-to-screen [<path/to/screenrc>]"
-        exit 0
-}
-
-SCREENRC = `pwd`/testing-screenrc
-
-if [ $# -lt 2 ]
-then    
-        if [ $# -eq 1 ]
-        then
-                case $1 in
-                        -*)  print_usage; exit 1;;                      
-                        *)   SCREENRC=$1;;
-                esac
-        fi
-else
-        echo "Too many arguments!"
-        print_usage
-        exit 1
-fi
-
-for screen_instance in `screen -ls | sed '1d;/Socket/d;$d;s/^.*\.//;s/(.*$//'`
-do
-	if [ $screen_instance = "testing" ]
-	then
-		screen -raD testing
-		exit 0
-	fi
-done
-
-`screen -c $SCREENRC -S testing`

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/tx-update-launchpad.sh
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/tx-update-launchpad.sh b/integrationtest.web/src/main/shell/tx-update-launchpad.sh
deleted file mode 100755
index 3a78ab5..0000000
--- a/integrationtest.web/src/main/shell/tx-update-launchpad.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/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.
-#
-#
-
-
-print_usage()
-{
-	echo "usage: tx-update-launchpad [<output-directory> <project-uri>]"
-	exit 0
-}
-
-
-
-LAUNCHPAD_DIR=`pwd`
-LAUNCHPAD_URI=http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.cms.launchpad/
-
-if [ $# -lt 3 ]
-then	
-	if [ $# -ge 1 ]
-	then
-		case $1 in
-			-*)  print_usage; exit 1;;			
-			*)   LAUNCHPAD_DIR=$1;;
-		esac
-	fi
-	if [ $# -eq 2 ]
-	then
-		LAUNCHPAD_URI = $2
-	fi
-else
-	echo "Too many arguments!"
-	print_usage
-	exit 1
-fi
-
-
-echo "looking for latest launchpad version..."
-
-for line in `curl $LAUNCHPAD_URI 2> /dev/null | sed 's/^.*\">//;s/<\/a.*$//;1,/Parent
Directory/d;/^[^0-9]/,$d;'`
-do
-	latest_dir=$line
-done
-
-for line in `curl $LAUNCHPAD_URI$line 2> /dev/null | sed '1,/<a href=\"o/d;/<hr>/,$d;/.jar</!d;/sources/d;s/^
*<a href=\"//;s/\">.*$//'`
-do
-	latest_file=$line
-done
-
-echo "found: $latest_dir$latest_file"
-
-if [ -e $LAUNCHPAD_DIR/$latest_file ]
-then
-	echo "the current launchpad is already the latest version."
-else
-	echo "downloading the latest launchpad..."
-	
-	oldfile=`ls -l launchpad | sed 's/^.*-> //'`
-
-	if  wget -O $LAUNCHPAD_DIR/$latest_file $LAUNCHPAD_URI$latest_dir$latest_file
-	then
-		if [ -e launchpad ]
-		then
-			if [ "$oldfile" != "$latest_file" ]
-			then
-				rm -f $LAUNCHPAD_DIR/$oldfile
-				unlink launchpad
-			fi
-		fi
-
-		ln -s $LAUNCHPAD_DIR/$latest_file launchpad
-	else
-		exit 1
-	fi
-fi
-
-exit 0

http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fc39996..be51525 100644
--- a/pom.xml
+++ b/pom.xml
@@ -164,16 +164,6 @@
             </build>
         </profile>
         <profile>
-            <id>it</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <modules>
-                <module>integrationtest.web</module>
-                <module>integrationtest.web.performance</module>
-            </modules>
-        </profile>
-        <profile>
             <id>additions</id>
             <activation>
                 <activeByDefault>false</activeByDefault>


Mime
View raw message