Dale Wijnand
deea82542c
Remove unused imports
2016-07-12 11:55:10 +01:00
Dale Wijnand
12c2734052
Pattern match some if/else's
2016-07-07 18:21:25 +01:00
Dale Wijnand
32760bed55
Remove some fatal exception catching
2016-07-07 18:21:25 +01:00
Dale Wijnand
d77e769635
Cleanup testAgentProj
2016-07-07 01:40:01 +01:00
Dale Wijnand
824df04699
Cleanup testingProj
2016-06-21 08:09:29 +01:00
Dale Wijnand
15d4527479
Kill trailing dead code
2016-06-21 08:09:29 +01:00
Martin Duhem
a2abb6eeb6
Update to latest version of incremental, fix imports
2015-09-16 10:16:03 +02:00
Martin Duhem
c981abd295
Fix all imports
2015-09-14 14:28:09 +02:00
Pierre DAL-PRA
54d54b9f4f
Replace procedure syntax by explicit Unit annotation
2015-08-04 10:07:38 +02:00
Kamil Kloch
cd3af2f0cd
Updated ForkError.getMessage() to include exception's original name.
2015-05-25 13:50:56 +02:00
Allan Erskine
24d2a2024b
Fixes #1881 . Clone SystemProperties defending against ConcurrentModificationException
2015-02-28 23:46:02 -05:00
Jean-Rémi Desjardins
ca736e55d3
Minor code cleanup
2014-12-03 09:56:34 -08:00
Josh Suereth
d2950da9dd
Fix issue where ScalaInstance broke the thread-context-classloader for all scala classes.
...
The issue is that when you manually set a ScalaInstance, i.e. not one from Ivy, the
classpath which is returned for any given configuration ONLY uses Ivy. This means that
the legitimate Scala JAR files that need to be on the classpath are missing from the list.
For some reason, the way we instantiate tests uses an unfiltered classloader against the
ScalaInstance, *BUT* the thread-context-classloader DOES use a filtered instance by
classpath. This add the hook into the TestFramework runner creation so that
the classpath accurately reflects the jars needed.
cc @rkuhn
2014-09-09 08:56:51 -04:00
Eugene Yokota
482bdc1b77
scalariform changes
2014-08-15 01:52:31 -04:00
Josh Suereth
666819e707
Fix unknown host exception in junit xml listener.
...
Fixes #1506
2014-08-08 13:03:01 -04:00
Josh Suereth
ef70d84323
Fixes #1306 - Attempt to turn test suite names into better filenames.
2014-08-01 17:14:00 -04:00
Peter Vlugter
f7fbdb0281
Select the first test fingerprint for a test name for forked tests
...
Move the 'distinct by name' filter to Tests.processOptions, which is used
by both in-process and forked tests.
2014-07-14 11:57:52 +12:00
Josh Suereth
4c2d88649e
Fix formatting issues and bump to sbt 0.13.5
2014-05-28 09:12:55 -04:00
Josh Suereth
89091ca4fc
Merge remote-tracking branch 'origin/0.13.5' into wip/fix-doc-generation
...
Conflicts:
project/Sbt.scala
2014-05-28 09:09:51 -04:00
Josh Suereth
b69a273f37
Fix import issues to generate sxr/scaladoc.
2014-05-28 08:55:29 -04:00
cheeseng
83af01b88a
Changed to combine SuiteResult with same name, instead of replacing with latest one. This solves the test result count problem when a Suite is executed more than 1 time due to being returned as nested suites (sub-task).
2014-05-22 17:28:26 +08:00
xuwei-k
25b22f951a
remove unnecessary var
2014-05-03 06:01:13 +09:00
Eugene Yokota
adb41611cf
added scalariform
2014-05-01 12:50:07 -04:00
Bruno Bieth
b38b86add5
Added a test reporter for JUnit XML
...
Taken from https://github.com/chenkelmann/junit_xml_listener and slightly improved.
Activating is now just a matter of setting `testReportJUnitXml` to true.
This not only brings a very handy feature (hudson/jenkins support that syntax),
but gives more options for testing the SBT test infrastructure.
For instance checking that the test output is well segregated during a parallel
test run is just a matter of checking the report output.
Conflicts:
main/src/main/scala/sbt/Keys.scala
2014-04-22 08:36:52 -04:00
Josh Suereth
0a8d844071
Fix merge conflicts in pulling doc fixes from 0.13.1 into 0.13 branch.
2014-03-06 10:10:38 -05:00
Bruno Bieth
5a88bd2302
Third draft to execute the forked tests in parallel.
...
This feature is not activated by default. To enable it set `testForkedParallel` to `true`.
The test-agent then executes the tests in a thread pool.
For now it has a fixed size set to the number of available processors.
The concurrent restrictions configuration should be used.
2013-11-21 08:20:43 -05:00
Mark Harrah
c5120636e4
Continuation of previous commit's workaround for #937 : close test streams early
2013-11-04 13:10:06 -05:00
James Roper
b337f3d9ac
Flush ObjectOutputStreams after construction
...
This protects against deadlocks between the writing and reading end,
since the ObjectOutputStream constructor writes a header, but does not
flush, and the ObjectInputStream constructor reads the header, and
blocks until it's read.
2013-11-01 13:26:07 -04:00
Mark Harrah
bedc129d0e
remove dead code in TestFramework
2013-10-11 18:48:48 -04:00
Mark Harrah
277813dd0a
Improve forked test debugging by listing tests run by sbt. Fixes #868 .
...
This helps diagnosing issues on the sbt/framework border by verifying
that sbt is properly collecting and invoking tests.
2013-10-03 10:57:00 -04:00
Mark Harrah
a0e301e3d8
Pick the first test fingerprint for a given suite/class name. Fixes #827 .
...
This drops older code that picked a single fingerprint within a framework.
This commit ensures only one name is executed across all frameworks.
The precedence is the order that frameworks are declared in Defaults.scala.
JUnit should be last because it is common for specs tests to be annotated
with @RunWith for Eclipse support. If a distinct fingerprint is not
picked, the test will be run by both specs and JUnit.
In addition to this main reason, result processing code assumes one result
per test class name and would have to be fixed if multiple fingerprints
were allowed.
2013-07-25 17:36:11 -04:00
Mark Harrah
45677de789
test arguments no longer need to be passed throughout- they are now only used in Runner construction
2013-07-11 21:13:06 -04:00
Mark Harrah
ef4ce0f789
Deleted unused discovered test parser/printer
2013-07-09 14:55:30 -04:00
Mark Harrah
ccff43ce8c
API docs and cleanup for test configuration data structures
2013-07-08 09:14:19 -04:00
Mark Harrah
a1a00526ff
properly wrap unknown test data structures in serializable ones
2013-06-28 12:12:58 -04:00
Mark Harrah
3e74b92bf8
TestFingerprintWrapper no longer necessary
2013-06-28 11:18:17 -04:00
Mark Harrah
301c11f9e0
Drop ForkTestDefinition in favor of TaskDef
2013-06-28 09:24:47 -04:00
Mark Harrah
ba28e5b505
not necessary to rewrap TaskDef in FrameworkWrapper.createTask
2013-06-28 09:24:33 -04:00
Mark Harrah
019920c138
duration() is specified to return -1 when none exists
2013-06-28 09:09:46 -04:00
cheeseng
6d4e51386f
Added Specs2 new implementation class name.
2013-06-28 18:04:08 +08:00
cheeseng
86f47bd67d
Added explicitlySpecified and selectors field to ForkTestDefinition, and change ForkMain to use explicitlySpecified and selectors value sent from ForkTests.
2013-06-28 17:45:13 +08:00
cheeseng
0c66d1a5d3
Added support of Ignore, Canceled and Pending added in the latest framework API.
2013-06-28 17:19:27 +08:00
cheeseng
5bb46359b5
Change to use test-interface-1.0-SNAP7, and use ScalaTest 2.0.M6-SNAP26 which implemented test-interface-1.0-SNAP7.
2013-06-28 17:18:38 +08:00
cheeseng
a920c739d6
Added support of nested test tasks when tests are executed in SubProcess.
2013-04-25 00:06:52 +08:00
cheeseng
3109912d00
Added support of nested test tasks when tests are executed InProcess and sequentially.
2013-04-25 00:06:52 +08:00
cheeseng
ad18b4f3ae
Added code to tag test task using Array[String] returned from Task.tags method.
2013-04-25 00:06:51 +08:00
cheeseng
1ec2118219
-Moved code that count test results from TestLogger to SuiteResult.
...
-Print the results in Tests.showResult.
2013-04-25 00:06:41 +08:00
cheeseng
a76523a5f6
Added >1 framework class per framework support, this enables sbt to support both old and new framework API at the same time.
2013-04-23 12:00:05 +08:00
cheeseng
f38a244d0f
Added code to call Runner's done() method in both InProcess and SubProcess cases.
2013-04-23 12:00:03 +08:00
cheeseng
244e65cd79
-Changed behavior so that only a single Runner instance is used to run tests in multiple test groups.
...
-Added code to support remoteArgs in test-interface 1.0.
2013-04-23 11:09:50 +08:00
cheeseng
d2e40c1c56
Changed createTeskTasks in TestFramework.scala to reuse TestRunner instance when running different TestDefinition.
2013-04-23 11:09:49 +08:00
cheeseng
b2b9fb132a
Made to ForkMain's write method synchronized, to ensure the output stream won't corrupt when test framework implementation uses multi-threads to write event back to sbt.
2013-04-23 11:09:49 +08:00
cheeseng
18bc8423b5
Initial version that uses new framework API in test-interface 1.0:
...
-Changed usages and implementations of interfaces in org.scalatools.testing._ to use/implement interfaces/classes in sbt.testing._ instead.
-Added sbt.testing to interfaceFilter in TestFramework.createTestLoader method to enable loading of classes in sbt.testing package.
-Added FrameworkWrapper.java to wrap old framework implementations.
-Added code in ForkMain.java to serialize Selectors.
2013-04-23 11:09:37 +08:00
Mark Harrah
e32f5fec1f
hashCode for TestDefinition
2013-02-25 09:24:05 -05:00
Mark Harrah
f6d73128fc
deprecations
2013-02-25 09:24:04 -05:00
Mark Harrah
bd0f208302
Class loader that restricts loading to a classpath. Ref #661 .
...
It is now used for consoleProject, run, and test. This loader verifies
that all classes loaded through it came from a particular classpath or
from the "root" loader. Root loader here is the launcher loader so that
those classes with native bindings come from that shared loader.
2013-02-21 20:44:26 -05:00
Mark Harrah
ae74fff88c
When serially executing tests*, order tests by testOnly filter order
...
* parallelExecution in test := false
cc @bantonsson
2013-02-13 10:27:43 -05:00
Mark Harrah
9702d3d318
Handle exceptions not caught by the test framework when forking. Fixes #653 .
2013-01-28 17:14:53 -05:00
Paolo G. Giarrusso
d64a0e078d
Silence boring Eclipse warnings: catching all exceptions, part 2
...
These warning fixes are new since my last pull request, please verify.
2013-01-22 09:05:15 -05:00
Grzegorz Kossakowski
ef39aeb9c1
Follow source layout convention supported by Eclipse.
...
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Mark Harrah
24be2e5f25
Only make one call to test frameworks per test name. Fixes #520 .
...
- Requires selecting one fingerprint if there are more than one
- The selected fingerprint is by reverse ordering of Framework.tests
- Reverse ordering chosen to work with junit-interface without changes
2012-12-06 12:15:34 -05:00
Eugene Vigdorchik
960d17c358
Use java.lang.Throwable.setStackTrace. Proper fix for #543 .
2012-11-15 10:14:59 -05:00
Eugene Vigdorchik
4bb5007282
Call System.exit after the main thread is finished. Closes #565 .
2012-10-16 07:47:30 -04:00
Eugene Vigdorchik
88e8090d7a
Abort running tests on the first failure to communicate results back to the main process. Closes #557 .
2012-10-16 07:47:30 -04:00
Eugene Vigdorchik
b8ef434ec1
When forking tests serialize Event.error as well. Closes #543 .
2012-09-18 13:23:29 -04:00
Eugene Vigdorchik
b4e64d37db
Various fork in Test fixes. Closes #512 #515 .
2012-08-25 07:15:23 -04:00
Eugene Vigdorchik
04d53c05d5
Modify forking tests based on Stefan's feedback. Should be ported to 0.12
2012-05-09 20:07:47 -04:00
Mark Harrah
75dfccf098
move ForkMain.Tags out to top-level ForkTags to make sxr happy
2012-04-06 23:29:48 -04:00
Eugene Vigdorchik
b5766e4057
Fix newlines and indentation.
2012-04-04 09:30:46 +04:00
Eugene Vigdorchik
291db63af3
Fixes
2012-04-03 19:43:59 +04:00
Eugene Vigdorchik
c4385adce0
Some more fixes.
2012-04-03 11:49:41 +04:00
Eugene Vigdorchik
4abefbd3b6
Remove redundant try/catch.
2012-04-02 23:56:42 +04:00
Eugene Vigdorchik
2741515d44
Fixes after review, take 3.
2012-04-02 16:05:56 +04:00
Eugene Vigdorchik
4d5effcb28
Fixes after review, take 2.
2012-04-02 12:08:18 +04:00
Eugene Vigdorchik
7afc9e77c6
\'fork in test\' initial implementation.
2012-04-01 11:44:05 +04:00
Eugene Vigdorchik
d5bf8cf6d6
Transitive compilation dependency tracking.
2012-03-08 18:58:44 +04:00
Eugene Vigdorchik
e92ba43b3f
Add API dependency tracking to testQuickFilter.
2012-03-07 12:28:40 +04:00
Eugene Vigdorchik
6e0ad08ad3
testQuick: track previous test status.
2012-03-05 17:17:55 +04:00
Eugene Vigdorchik
1458cd52dc
Use AtomicInteger for test statistics, Fixes #372 .
2012-02-20 19:12:44 +04:00
Mark Harrah
bb765db6c2
drop compatibility framework definitions (dead anyway)
2012-02-07 21:56:37 -05:00
Mark Harrah
bf472b8ff4
TestFramework.toString
2012-01-27 21:09:11 -05:00
Mark Harrah
1d4d566d6b
support use of native libraries in 'run' and 'test'
2011-08-05 21:56:32 -04:00
Indrajit Raychaudhuri
bb75b74eb6
Remove some deprecations and redundant code
2011-08-05 13:30:04 +05:30
Mark Harrah
3eef6229db
show test key in no tests message. fixes #102
2011-07-12 23:09:57 -04:00
Mark Harrah
608ff76a17
fixes #90
2011-07-08 21:54:59 -04:00
Mark Harrah
7d08bfe3ca
add specs2 to list of known test frameworks
2011-05-29 19:17:31 -04:00
Mark Harrah
c8fe1a3c1d
buffered, separate loggers for each test
2011-05-07 22:02:06 -04:00
Mark Harrah
897f9ca3d1
in tests, allow access to loaded compiler classes if compiler on classpath
2011-04-15 18:21:52 -04:00
Mark Harrah
a68e4c74f9
updating more integration tests
2011-02-25 18:35:52 -05:00
Mark Harrah
46a6a1af16
'test' task
2010-11-24 14:03:26 -05:00
Mark Harrah
c87fae4465
preserve compatibility for TestCleanup and TestSetup
2010-10-09 15:19:06 -04:00
Mark Harrah
1a122d380f
allow setup, cleanup functions to access ClassLoader used for testing
2010-09-13 19:43:37 -04:00
Mark Harrah
6f3c699435
- Stuart's improvements to triggered execution
...
- continue splitting original sbt module
* separated process, testing modules
* various IO, logging, classpath migration
* split out javac interface
2010-07-05 12:53:37 -04:00