Skip to content

Instantly share code, notes, and snippets.

@sam
Created October 23, 2012 14:37
Show Gist options
  • Save sam/3939116 to your computer and use it in GitHub Desktop.
Save sam/3939116 to your computer and use it in GitHub Desktop.
Doubleshot test output (for run all specs, triggered by Signal.trap("INT")
# This comes from here: https://github.com/sam/doubleshot/blob/master/lib/doubleshot/compiler.rb
#
# If you have JRuby 1.7.0, Java7, Maven and Bundler installed, you can reproduce the attached output like so:
#
# cd ~/src
# git clone git://github.com/sam/doubleshot.git
# cd doubleshot
# bundle install
# bin/doubleshot test --ci
require "ant"
require "doubleshot/compiler/classpath"
class Doubleshot
class Compiler
def initialize(source, target)
@source = Pathname(source.to_s)
@target = Pathname(target.to_s)
@classpath = Classpath.new
end
attr_reader :source, :target, :classpath
def pending?
sources = Pathname::glob(@source + "**/*.java")
targets = Pathname::glob(@target + "**/*.class")
!sources.empty? && (targets.empty? || sources.map(&:mtime).max > targets.map(&:mtime).max)
end
def build!(add_target_to_current_classpath = false)
@target.mkdir unless @target.exist?
# The JRuby ant integration throws JRuby Persistence
# warnings that you can't supress, so we run it
# inside of a Kernel#silence block.
silence do
# Since the ant.path block is instance_evaled,
# the following line is a hack to ensure we have
# access to the contents of @classpath.
classpath = @classpath
ant.path id: "classpath" do
classpath.each do |path|
fileset dir: path
end
end
ant.javac srcdir: @source.to_s,
destdir: @target.to_s,
debug: "yes",
includeantruntime: "no",
classpathref: "classpath"
end
$CLASSPATH << @target.to_url if add_target_to_current_classpath
self
end
end # class Compiler
end # class Doubleshot
^C
--- Running all tests ---
Bootstrapping Doubleshot build with Maven...
[INFO] Using CLASSPATH: /Users/sam/.m2/repository/com/ning/async-http-client/1.6.5, /Users/sam/.m2/repository/commons-codec/commons-codec/1.4, /Users/sam/.m2/repository/commons-io/commons-io/2.0.1, /Users/sam/.m2/repository/commons-logging/commons-logging/1.1.1, /Users/sam/.m2/repository/org/apache/httpcomponents/httpclient/4.1.2, /Users/sam/.m2/repository/org/apache/httpcomponents/httpcore/4.1.2, /Users/sam/.m2/repository/org/apache/maven/maven-aether-provider/3.0.4, /Users/sam/.m2/repository/org/apache/maven/maven-model/3.0.4, /Users/sam/.m2/repository/org/apache/maven/maven-model-builder/3.0.4, /Users/sam/.m2/repository/org/apache/maven/maven-repository-metadata/3.0.4, /Users/sam/.m2/repository/org/apache/maven/wagon/wagon-file/2.2, /Users/sam/.m2/repository/org/apache/maven/wagon/wagon-http/2.2, /Users/sam/.m2/repository/org/apache/maven/wagon/wagon-http-shared4/2.2, /Users/sam/.m2/repository/org/apache/maven/wagon/wagon-provider-api/2.2, /Users/sam/.m2/repository/org/codehaus/plexus/plexus-classworlds/2.4, /Users/sam/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5, /Users/sam/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14, /Users/sam/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.7, /Users/sam/.m2/repository/org/jboss/netty/netty/3.2.5.Final, /Users/sam/.m2/repository/org/jsoup/jsoup/1.6.1, /Users/sam/.m2/repository/org/slf4j/slf4j-api/1.6.2, /Users/sam/.m2/repository/org/sonatype/aether/aether-api/1.13.1, /Users/sam/.m2/repository/org/sonatype/aether/aether-connector-asynchttpclient/1.13.1, /Users/sam/.m2/repository/org/sonatype/aether/aether-connector-file/1.13.1, /Users/sam/.m2/repository/org/sonatype/aether/aether-connector-wagon/1.13.1, /Users/sam/.m2/repository/org/sonatype/aether/aether-impl/1.13.1, /Users/sam/.m2/repository/org/sonatype/aether/aether-spi/1.13.1, /Users/sam/.m2/repository/org/sonatype/aether/aether-util/1.13.1, /Users/sam/.m2/repository/org/sonatype/sisu/sisu-guice/3.0.3, /Users/sam/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.2.3, /Users/sam/.m2/repository/org/sonatype/sisu/sisu-inject-plexus/2.2.3
Compiling...
Compiling 3 source files to /Users/sam/src/sam/doubleshot/target
warning: Supported source version 'RELEASE_6' from annotation processor 'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source '1.7'
1 warning
NO GEMS IN LOCKFILE
Run options: --seed 19677
# Running tests:
...Compiling 1 source file to /Users/sam/src/sam/doubleshot/tmp/target
warning: Supported source version 'RELEASE_6' from annotation processor 'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source '1.7'
1 warning
..Compiling 1 source file to /Users/sam/src/sam/doubleshot/tmp/target
warning: Supported source version 'RELEASE_6' from annotation processor 'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source '1.7'
1 warning
..Compiling 1 source file to /Users/sam/src/sam/doubleshot/tmp/target
warning: Supported source version 'RELEASE_6' from annotation processor 'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source '1.7'
1 warning
.Compiling 1 source file to /Users/sam/src/sam/doubleshot/tmp/target
warning: Supported source version 'RELEASE_6' from annotation processor 'org.sonatype.guice.bean.scanners.index.SisuIndexAPT6' less than -source '1.7'
1 warning
.............................................................................................................................................
Fabulous tests in 15.249000s, 10.1646 tests/s, 14.5583 assertions/s.
155 tests, 222 assertions, 0 failures, 0 errors, 6 skips
Completed in 27.184s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment