[logback-dev] [GIT] Logback: the generic, reliable, fast and flexible logging framework. branch, master, updated. v0.9.18-25-g1b5bc6b
added by portage for gitosis-gentoo
git-noreply at pixie.qos.ch
Fri Feb 12 18:13:11 CET 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Logback: the generic, reliable, fast and flexible logging framework.".
The branch, master has been updated
via 1b5bc6b3190a00aa9f137b445635e9dc9ced738e (commit)
from 172744139d9062c5f0b3be00d2f31f01d988eafc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.qos.ch/gitweb/?p=logback.git;a=commit;h=1b5bc6b3190a00aa9f137b445635e9dc9ced738e
http://github.com/ceki/logback/commit/1b5bc6b3190a00aa9f137b445635e9dc9ced738e
commit 1b5bc6b3190a00aa9f137b445635e9dc9ced738e
Author: Ceki Gulcu <ceki at qos.ch>
Date: Fri Feb 12 18:09:16 2010 +0100
- minor clean up of allInOneSafeMode.sh script
- other minor/cosmetic changes
- removed multiThreadSanityCheck.sh whose contents are now run automatically
diff --git a/logback-classic/src/test/allInOneSafeMode.sh b/logback-classic/src/test/allInOneSafeMode.sh
index 29e8138..cf1aed1 100644
--- a/logback-classic/src/test/allInOneSafeMode.sh
+++ b/logback-classic/src/test/allInOneSafeMode.sh
@@ -1,6 +1,12 @@
# Use this script both generate and check the results. It only works
# if there is only one instance of this script
+if [ $# -lt 3 ]
+then
+ echo "Usage: allInOneSafeMode.sh filename runLen stamp0 ... stampN"
+ exit 1;
+fi
+
echo "File name $1"
echo "run length $2"
@@ -8,16 +14,17 @@ echo "run length $2"
#On windows
-#CLASSPATH="${CLASSPATH};./target/classes/"
-#CLASSPATH="${CLASSPATH};./target/test-classes/"
-#CLASSPATH="${CLASSPATH};../logback-core/target/classes"
-#CLASSPATH="${CLASSPATH};../logback-examples/lib/slf4j-api-1.5.5.jar"
+#CLASSPATH="${CLASSPATH}\;./target/classes/"
+#CLASSPATH="${CLASSPATH}\;./target/test-classes/"
+#CLASSPATH="${CLASSPATH}\;../logback-core/target/classes"
+#LASSPATH="${CLASSPATH}\;../logback-examples/lib/slf4j-api-1.5.10.jar"
+echo $CLASSPATH
# On Unix
#CLASSPATH="${CLASSPATH}:./target/classes/"
#CLASSPATH="${CLASSPATH}:./target/test-classes/"
#CLASSPATH="${CLASSPATH}:../logback-core/target/classes"
-#CLASSPATH="${CLASSPATH}:../logback-examples/lib/slf4j-api-1.5.5.jar"
+#CLASSPATH="${CLASSPATH}:../logback-examples/lib/slf4j-api-1.5.10.jar"
if [ -f $1 ]
then
@@ -25,11 +32,7 @@ then
rm $1;
fi
-if [ $# -lt 3 ]
-then
- echo "Usage: testSafeMode.sh filename runLen stamp0 ... stampN"
- exit 1;
-fi
+
FILENAME=$1
LEN=$2
diff --git a/logback-classic/src/test/java/ch/qos/logback/classic/multiJVM/Checker.java b/logback-classic/src/test/java/ch/qos/logback/classic/multiJVM/Checker.java
index ed69d5a..0ce1a4a 100644
--- a/logback-classic/src/test/java/ch/qos/logback/classic/multiJVM/Checker.java
+++ b/logback-classic/src/test/java/ch/qos/logback/classic/multiJVM/Checker.java
@@ -28,7 +28,7 @@ public class Checker {
System.err
.println("Usage: java "
+ Checker.class.getName()
- + " runLength filename stamp0 stamp1 ..\n"
+ + " runLength filename stamp0 stamp1 ..stampN\n"
+ " runLength (integer) the number of logs to generate perthread\n"
+ " filename (string) the filename where to write\n"
+ " stamp0 JVM instance stamp0\n"
@@ -57,13 +57,11 @@ public class Checker {
String regExp = "^" + stamp + " DEBUG - " + LoggingThread.msgLong
+ " (\\d+)$";
- // System.out.println(regExp);
Pattern p = Pattern.compile(regExp);
String line;
int expected = 0;
while ((line = br.readLine()) != null) {
- // System.out.println(line);
Matcher m = p.matcher(line);
if (m.matches()) {
String g = m.group(1);
@@ -86,7 +84,5 @@ public class Checker {
}
fr.close();
br.close();
-
}
-
-}
+}
\ No newline at end of file
diff --git a/logback-core/src/test/build.xml b/logback-core/src/test/build.xml
deleted file mode 100644
index ff824ec..0000000
--- a/logback-core/src/test/build.xml
+++ /dev/null
@@ -1,175 +0,0 @@
-<project name="lbcore" default="usage" basedir=".">
-
- <property file="build.properties" />
-
- <!-- The base directory relative to which most targets are built -->
- <property name="base" value="." />
-
- <property name="target" value="../../target" />
-
- <!-- The directory where source files are stored. -->
-
- <property name="project.source.home" value="../src/main/java/" />
- <property name="project.classes.home" value="${target}/classes/" />
-
- <property name="tests.source.home" value="./java/" />
-
- <!-- The stem where most LB core source code is located. -->
- <property name="stem" value="com/logback/core" />
-
- <!-- Destination for compiled files -->
- <property name="javac.dest" value="${target}/test-classes/" />
-
-
- <path id="tests.classpath">
- <pathelement location="${project.source.home}" />
- <pathelement location="${project.classes.home}" />
- <pathelement location="${tests.source.home}" />
- <pathelement location="${javac.dest}" />
- <pathelement location="./resources" />
- <fileset dir="../../lib/">
- <include name="*.jar" />
- </fileset>
- </path>
-
-
- <!-- ================================================================= -->
- <!-- TARGETS -->
- <!-- ================================================================= -->
-
-
-
- <!-- ================================================================= -->
- <!-- Default target -->
- <!-- ================================================================= -->
-
- <target name="usage">
- <echo>
-
- These are the targets supported by this ANT build scpript:
-
- build - compile all project files, if a certain library is missing,
- then the compilation of its dependents are skipped.
-
- all - run all available tests
- </echo>
- </target>
-
- <target name="prepare">
- <mkdir dir="${javac.dest}" />
- <mkdir dir="./output" />
- </target>
-
- <!-- ================================================================= -->
- <!-- Check if prerequisites are available -->
- <!-- ================================================================= -->
-
- <target name="check" depends="junitCheck">
- </target>
-
- <target name="junitCheck">
- <available classname="junit.framework.Test" property="junit-present">
- <classpath refid="tests.classpath" />
- </available>
-
- <fail unless="junit-present">
- Could not find junit classes. Is the file junit.jar missing?
- See the documentation for the junit task in the Apache Ant Manual.
- </fail>
- </target>
-
- <!-- Clean the parent project -->
- <!-- ================================================================= -->
- <target name="parentClean">
- <ant dir=".." target="clean" inheritRefs="true" />
- </target>
-
-
-
- <!-- ================================================================= -->
- <!-- Build the parent project -->
- <!-- ================================================================= -->
- <target name="parentBuild">
- <ant dir="../.." target="build" inheritRefs="false" />
- </target>
-
- <!-- ================================================================= -->
- <!-- Compile test cases and related source files. -->
- <!-- ================================================================= -->
- <target name="build" depends="prepare">
- <property name="haltonfailure" value="yes" />
- <javac srcdir="${tests.source.home}" destdir="${javac.dest}" excludes="${stem}/xynz/toto.java" deprecation="${deprecation}" debug="on">
- <classpath refid="tests.classpath" />
- </javac>
- </target>
-
- <!-- ================================================================= -->
- <!-- Remove all generated files such as compiled class files and test -->
- <!-- case output. -->
- <!-- ================================================================= -->
- <target name="clean">
- <delete dir="${javac.dest}/" />
- <delete dir="./output/" />
- </target>
-
- <target name="cleanOutputDir">
- <delete>
- <fileset dir="./output/" includes="**" />
- </delete>
- </target>
-
- <!-- ================================================================= -->
- <!-- Run all tests -->
- <!-- ================================================================= -->
- <target name="all" depends="build, AllUnit, Compress, Renaming,
- TimeBasedRolling,
- SkipInInterpreter" />
-
-
- <target name="AllUnit" depends="check, build, cleanOutputDir">
- <junit printsummary="yes" fork="yes" haltonfailure="yes">
- <classpath refid="tests.classpath" />
- <formatter type="plain" usefile="false" />
- <test name="ch.qos.logback.core.AllTest" />
- </junit>
- </target>
-
- <target name="Compress" depends="check, build, cleanOutputDir">
- <!-- The input files are erased as a result of compression. We -->
- <!-- need to "create" them afresh for each test. -->
- <copy file="input/compress1.copy" toFile="input/compress1.txt" />
- <copy file="input/compress2.copy" toFile="input/compress2.txt" />
- <copy file="input/compress3.copy" toFile="input/compress3.txt" />
- <junit printsummary="yes" fork="yes" haltonfailure="yes">
- <classpath refid="tests.classpath" />
- <formatter type="plain" usefile="false" />
- <test name="ch.qos.logback.core.rolling.helper.CompressTest" />
- </junit>
- </target>
-
- <target name="Renaming" depends="check, build, cleanOutputDir">
- <junit printsummary="yes" fork="yes" haltonfailure="yes">
- <classpath refid="tests.classpath" />
- <formatter type="plain" usefile="false" />
- <test name="ch.qos.logback.core.rolling.RenamingTest" />
- </junit>
- </target>
-
- <target name="TimeBasedRolling" depends="check, build, cleanOutputDir">
- <junit printsummary="yes" fork="yes" haltonfailure="yes">
- <classpath refid="tests.classpath" />
- <formatter type="plain" usefile="false" />
- <test name="ch.qos.logback.core.rolling.TimeBasedRollingTest" />
- </junit>
- </target>
-
- <target name="SkipInInterpreter" depends="check, build, cleanOutputDir">
- <junit printsummary="yes" fork="yes" haltonfailure="yes">
- <classpath refid="tests.classpath"/>
- <formatter type="plain" usefile="false" />
- <test name="ch.qos.logback.core.joran.SkippingInInterpreterTest" />
- </junit>
- </target>
-
-
-</project>
diff --git a/logback-core/src/test/java/ch/qos/logback/core/rolling/MultiThreadedRollingTest.java b/logback-core/src/test/java/ch/qos/logback/core/rolling/MultiThreadedRollingTest.java
index b41294d..aa4a968 100644
--- a/logback-core/src/test/java/ch/qos/logback/core/rolling/MultiThreadedRollingTest.java
+++ b/logback-core/src/test/java/ch/qos/logback/core/rolling/MultiThreadedRollingTest.java
@@ -66,7 +66,7 @@ public class MultiThreadedRollingTest {
File outputDir = new File(outputDirStr);
outputDir.mkdirs();
- System.out.println("MultiThreadedRollingTest output dir [" + outputDirStr + "]");
+ System.out.println("Output dir [" + outputDirStr + "]");
scriptOS = openScript();
@@ -134,7 +134,7 @@ public class MultiThreadedRollingTest {
FileOutputStream fos = new FileOutputStream(outputDirStr + VERIFY_SH);
return fos;
}
-
+
@Test
public void multiThreadedTimedBased() throws InterruptedException,
IOException {
@@ -161,7 +161,7 @@ public class MultiThreadedRollingTest {
void verify() throws IOException, InterruptedException {
close(scriptOS);
// no point in this test if we don't have bash
- if(pathToBash == null) {
+ if (pathToBash == null) {
return;
}
ProcessBuilder pb = new ProcessBuilder();
@@ -170,9 +170,11 @@ public class MultiThreadedRollingTest {
Process process = pb.start();
process.waitFor();
int exitCode = process.exitValue();
-
+
assertEquals(SUCCESSFUL_EXIT_CODE, exitCode);
- System.out.println("External script based verification returned with exit code "+exitCode);
+ System.out
+ .println("External script based verification returned with exit code "
+ + exitCode);
}
@Test
@@ -287,7 +289,5 @@ public class MultiThreadedRollingTest {
}
}
}
-
}
-
}
diff --git a/logback-core/src/test/multiThreadSanityCheck.sh b/logback-core/src/test/multiThreadSanityCheck.sh
deleted file mode 100755
index a9237c3..0000000
--- a/logback-core/src/test/multiThreadSanityCheck.sh
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-end[0]=116723
-end[1]=113160
-end[2]=100117
-end[3]=118897
-end[4]=111249
-end[5]=119030
-end[6]=106358
-end[7]=107372
-end[8]=113765
-end[9]=110767
-
-
-for t in $(seq 0 1 9)
-do
- echo doing $t
- grep "$t " aggregated |cut -d ' ' -f 2 > $t-def
- for i in $(seq 1 1 ${end[$t]}); do echo $i; done > $t-wit
- echo "diffing thread $t"
- diff -q $t-def $t-wit
- res=$?
- if [ $res != "0" ]; then
- echo "FAILED for $t"
- exit 1;
- fi
-done
-
-echo SUCCESS
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
logback-classic/src/test/allInOneSafeMode.sh | 23 ++-
.../ch/qos/logback/classic/multiJVM/Checker.java | 8 +-
logback-core/src/test/build.xml | 175 --------------------
.../core/rolling/MultiThreadedRollingTest.java | 14 +-
logback-core/src/test/multiThreadSanityCheck.sh | 29 ----
5 files changed, 22 insertions(+), 227 deletions(-)
delete mode 100644 logback-core/src/test/build.xml
delete mode 100755 logback-core/src/test/multiThreadSanityCheck.sh
hooks/post-receive
--
Logback: the generic, reliable, fast and flexible logging framework.
More information about the logback-dev
mailing list