summaryrefslogtreecommitdiff
path: root/src/partest
Commit message (Collapse)AuthorAgeFilesLines
* Move partest to https://github.com/scala/scala-partestAdriaan Moors2013-08-2040-3896/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As partest is now resolved from maven, `test/partest` uses `ant test.suite.init` to determine the classpath (serialized to build/pack/partest.properties) that's necessary to run `scala.tools.partest.nest.ConsoleRunner`. Thus, partest gets exactly the same classpath, whether run from the command line through `test/partest` or via `ant test`. The version of partest we're using is specified by properties defined in versions.properties (formerly `starr.number`). Currently, we're using: ``` scala.binary.version=2.11.0-M4 partest.version.number=1.0-RC3 ``` NOTES: - The version of Scala being tested must be backwards binary compatible with the version of Scala that was used to compile partest. - Once 2.11 goes final, `scala.binary.version=2.11`, and `starr.version=2.11.0`. - Need scalacheck on classpath for test/partest scalacheck tests. - Removed atrophied ant tests (haven't been run/changed for at least two years I checked 81d659141a as a "random" sample). - Removed scalacheck. It's resolved as a partest dependency. - For now, use a locally built scalap - Kept the trace macro in the main repo (partest-extras) - New targets for faster pr validation: test-core-opt, test-stab-opt - Reused partest eclipse/intellij project to partest-extras (note: the partest dependency is hard-coded)
* Merge branch 'master' into patmatPaul Phillips2013-08-201-1/+1
|\ | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/transform/patmat/MatchTranslation.scala
| * SI-7729 Fix broken windows buildSom Snytt2013-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixing #ifdiff uncovered a latent bug in partest when it detects paths to normalize in test log output. It would not normalize file separators for test names with non-word characters. This commit normalizes the test name to the ticket number as a workaround until the next partest version is picked up. It also fixes partest in this repo in case we've not yet switched over to the new repo. A separate PR will be submitted to the new repo as necessary.
* | Expand the understanding of bytecode tests.Paul Phillips2013-08-172-6/+18
|/ | | | | | | | The new method is the same as sameMethodAndFieldSignatures, but ignores generic signatures. This allows for testing methods which receive the same descriptor but differing generic signatures. In particular, this happens with value classes, which get a generic signature where a method written in terms of the underlying values does not.
* SI-7704 Fix partest's test category selection (again)Simon Ochsenreither2013-08-161-1/+1
| | | | | Looks like multiple, different fixes for this issue managed to break it again.
* Merge pull request #2785 from soc/SI-7704Adriaan Moors2013-08-163-12/+6
|\ | | | | SI-7704 Fix partest's test category selection
| * Clean up ConsoleRunner, --> returns Boolean ...Simon Ochsenreither2013-07-302-11/+6
| | | | | | | | ... not Unit now.
| * Add some explicit return types to s.t.c._Simon Ochsenreither2013-07-301-1/+0
| |
* | SI-7624 Fix -feature warnings in scala/tools/scalapSimon Ochsenreither2013-08-151-1/+1
| | | | | | | | | | | | ... and move scalap.scala.tools.scalap.scalax.rules to scalap.scala.tools.scalap.rules now that all the Monad/Functor/ Applicatve/... stuff has been removed.
* | SI-7624 Replace new{Term,Type}Name with {Term,Type}NameSimon Ochsenreither2013-08-151-3/+3
| |
* | SI-7624 Fix a few remaining -Xlint warnings ...Simon Ochsenreither2013-08-153-14/+5
| | | | | | | | | | in various places. This includes actors, compiler (mostly some new macro parts) continuations, partest, scaladoc, scalap.
* | Log file is zapped before test runSom Snytt2013-08-081-0/+3
| | | | | | | | | | | | | | | | | | Not all test configurations handle an existing log file. In particular, kicking off javac will append to the log file and always fail the test. Don't even ask how I know that.
* | SI-7729 Does Par-Test work? Absolutely!Som Snytt2013-08-083-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Testicolor just passed file arguments through; this commit does either toAbsolute or getAbsoluteFile (depending on the File API impedance mismatch) at ConsoleRunner (command line) and Runner (ant supplies absolute paths, but in case sbt runner doesn't, and who knows). It also sprinkles toAbsolute internally, where it may be redundant. Do I mean redundant or redolent? I noticed that my branch from last year relativized to test root always; so this is one of those choices one commits to. The point of breakage in this case was, if a path is not absolute, use test root / path, which only works (of course) if the relative path is relative to test root, which is no longer the case. Because all paths are now calculated with respect to the test file path, the "out" dir would change its relative path depending on the invocation.
* | Par-Test split checks work againSom Snytt2013-08-081-37/+31
|/ | | | | | | | | | | | Check files split into conditional blocks with partest flags have been broken since the new diff regime. For some reason, no one noticed. The clever scheme to "filter the diff" instead of just filtering the check file is abandoned as futile and unnecessary. Fix java6 checkfile for ifdiff fix.
* Merge pull request #2701 from som-snytt/issue/4594-repl-settingsAdriaan Moors2013-07-101-0/+13
|\ | | | | SI-4594 Repl settings command
| * SI-4594 Repl settings commandSom Snytt2013-07-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A settings command for the rest of us. The usual command line options are used, except that boolean flags are enabled with +flag and disabled with -flag. ``` scala> :settings +deprecation scala> new BigInt(java.math.BigInteger.TEN) { } <console>:8: warning: inheritance from class BigInt in package math is deprecated: This class will me made final. new BigInt(java.math.BigInteger.TEN) { } ^ res0: BigInt = 10 scala> :settings -deprecation scala> new BigInt(java.math.BigInteger.TEN) { } res1: BigInt = 10 ``` Multivalue "colon" options can be reset by supplying no values after the colon. This behavior is different from the command line. ``` scala> 1 toString warning: there were 1 feature warning(s); re-run with -feature for details res0: String = 1 scala> :settings -language:postfixOps scala> 1 toString res1: String = 1 scala> :settings -d = . -encoding = UTF-8 -explaintypes = false -language = List(postfixOps) -nowarn = false scala> :settings -language: scala> :settings -d = . -encoding = UTF-8 -explaintypes = false -language = List() -nowarn = false ```
* | Spin off parser combinators to scala-parser-combinators.jar.Adriaan Moors2013-07-051-1/+2
| |
* | Spin off src/library/scala/xml to src/xml/scala/xml.Adriaan Moors2013-07-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Remove the last vestiges of xml from Predef and Contexts. - Change build to compile scala.xml to scala-xml.jar. - Deploy scala-xml module to maven. - Update partest accordingly. Note: An older compiler cannot use the new standard library to compile projects that use XML. Thus, skipping locker will break the build until we use 2.11.0-M4 for STARR. In the future build process, where we drop locker, we would have to release a milestone that supports the old and the new approach to xml. As soon as we'd be using that new milestone for starr, we could drop support for the old approach.
* | Merge pull request #2694 from adriaanm/masterGrzegorz Kossakowski2013-07-011-2/+3
|\ \ | | | | | | Merge 2.10.x into master
| * \ Merge 2.10.x into masterAdriaan Moors2013-06-281-2/+3
| |\ \ | | |/ | |/| | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Namers.scala src/partest/scala/tools/partest/PartestTask.scala
| | * Less noise on a partest failure.Jason Zaugg2013-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Throwing a BuildException is the polite way to fail the Ant build. Before: BUILD FAILED /Users/jason/code/scala2/build.xml:1522: java.lang.RuntimeException: Test suite finished with 1 case failing: /Users/jason/code/scala2/test/files/pos/lub-dealias-widen.scala [FAILED] at scala.sys.package$.error(package.scala:27) [20 lines elided] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Total time: 2 minutes 35 seconds After: BUILD FAILED /Users/jason/code/scala2/build.xml:1522: Test suite finished with 1 case failing: /Users/jason/code/scala2/test/files/pos/lub-dealias-widen.scala [FAILED] Total time: 2 minutes 34 seconds
* | | SI-7591 Make s.t.p.n.ConsoleRunner use s.t.c.CommandLineSimon Ochsenreither2013-07-015-69/+93
| | | | | | | | | | | | | | | | | | | | | Before this change s.t.n.u.CommandLine was used instead. Remove command-line options --ansi, --buildmanager, --show-log which don't have any effect and don't seem to be used anywhere.
* | | SI-7591 Minor cleanupsSimon Ochsenreither2013-07-011-9/+2
|/ /
* | Remove dependency on combinators from CommandLinerParser.Adriaan Moors2013-06-252-3/+4
| | | | | | | | | | | | | | tools.cmd.CommandLineParser uses a small hand-rolled parser TODO: replace partest's usage of scala.tools.nsc.util.CommandLine by scala.tools.cmd.CommandLine
* | Merge pull request #2561 from soc/SI-7479Adriaan Moors2013-06-182-1/+3
|\ \ | | | | | | SI-7479 Make test/files/run/tailcalls.scala pass on Avian
| * | SI-7479 Make test/files/run/tailcalls.scala pass on AvianSimon Ochsenreither2013-06-101-0/+1
| | | | | | | | | | | | This commit modifies the test and check file to use the new diff filter.
| * | SI-7479 Add avian option to partest's diff filter...Simon Ochsenreither2013-06-061-1/+2
| | | | | | | | | | | | | | | ... so that the different results of the test on Avian can be specified in the check file.
* | | Merge branch '2.10.x' into topic/merge-v2.10.2-RC1-35-ga54d86b-to-masterJason Zaugg2013-06-101-0/+27
|\ \ \ | | |/ | |/| | | | | | | Conflicts: src/partest/scala/tools/partest/DirectTest.scala
| * | Refactor testing logic for only running under certain JDK versionsJames Iry2013-06-041-0/+27
| | | | | | | | | | | | | | | | | | We had several tests designed to only run if the JDK version was at least some specified version. This commit refactors that common logic into DirectTest.
* | | SI-2464 Resiliance against missing InnerClass attributesJason Zaugg2013-06-061-4/+31
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | A classfile in the wild related to Vaadin lacked the InnerClasses attribute. As such, our class file parser treated a nested enum class as top-level, which led to a crash when trying to find its linked module. More details of the investigation are available in the JIRA comments. The test introduces a new facility to rewrite classfiles. This commit turns this situation into a logged warning, rather than crashing. Code by @paulp, test by yours truly.
* | Merge pull request #2584 from som-snytt/issue/repl-tools-jarPaul Phillips2013-05-261-29/+2
|\ \ | | | | | | SI-7410 REPL uses improved tools.jar locator
| * | SI-7410 REPL uses improved tools.jar locatorSom Snytt2013-05-231-29/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic in partest for snooping around for tools.jar is moved to PathResolver, and ILoop uses it from there. If JAVA_HOME is toolless, check out java.home. The use case was that Ubuntu installs with `java` at version 6 and `javac` at version 7; it's easy to wind up with JAVA_HOME pointing at the version 6 JRE, as I discovered. It's confusing when that happens. In future, partest might run under 7 and fork tests under 6, but those permutations are downstream.
* | | SI-7198 Par-Test uses filters filesSom Snytt2013-05-251-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partest will also read files/filters and files/kind/filters for filter expressions (one per line, trimmed, leading #comments) which are taken as regexes. A test/files/filters is provided which attempts to quell HotSpot warnings; the test for this commit requires it. The elided lines can be revealed using the lemon juice of verbosity: apm@mara:~/projects/snytt/test$ ./partest --verbose --show-diff files/run/t7198.scala [snip] >>>>> Transcripts from failed tests >>>>> > partest files/run/t7198.scala % scalac t7198.scala [snip] % filtering t7198-run.log --Over the moon --Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28). The filtering operation is part of the transcript, which is printed on failure. No attempt is made to be clever about not slurping the filters file a thousand times. Previous literal patterns had to be updated because there's parens in them thar strings. Future feature: pattern aliases, define once globally and invoke in test filters.
* | | SI-7003 Partest redirects stderr to log fileSom Snytt2013-05-252-44/+95
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some scalac output is on stderr, and it's useful to see that in the log file, especially for debugging. Adds a line filter for logs, specified as "filter: pattern" in the test source. Backslashes are made forward only when detected as paths. Test alignments: Deprecations which do not pertain to the system under test are corrected in the obvious way. When testing deprecated API, suppress warnings by deprecating the Test object. Check files are updated with useful true warnings, instead of running under -nowarn. Language feature imports as required, instead of running under -language. Language feature not required, such as casual use of postfix. Heed useful warning. Ignore broken warnings. (Rarely, -nowarn.) Inliner warnings pop up under -optimise only, so for now, just filter them out where they occur. Debug output from the test required an update.
* | Harden partest against duplicate paths.Paul Phillips2013-05-201-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A serious issue: partest would launch the same test multiple times if a test path was given in multiple forms (e.g. absolute and relative paths.) Unfortunately all those tests would share the same logfile, output directory, etc. which would predictably lead to explosions. Since overwriting classfiles while being loaded can lead to jvm core dumps, it's possible this is involved in recent jvm crashes and other test breakdowns. This commit also alters the default partest verbosity to only full print test transcripts under --verbose.
* | Merge pull request #2562 from som-snytt/issue/double-pluginv2.11.0-M3Jason Zaugg2013-05-201-2/+4
|\ \ | | | | | | SI-7494 Each plugin must only be instantiated once.
| * | SI-7494 Tests for status quoSom Snytt2013-05-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exploit SI-6446 fix to move old pending tests for plugins to the active pool. Also, nuance the partest runner to allow the compiler to crash with a FatalError if a check file is present. Some of the plugin tests make phase assembly throw. One of the legacy tests was moved back to pending: There seems to be a race for who shall be deemed truly dependent. Back to pending for you! apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/ Selected 1 tests drawn from specified tests > starting 1 test in neg ok 1 - neg/t7494-cyclic-dependency 1/1 passed (elapsed time: 00:00:04) Test Run PASSED apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/ Selected 1 tests drawn from specified tests > starting 1 test in neg !! 1 - neg/t7494-cyclic-dependency [output differs] > 0/1 passed, 1 failed in neg >>>>> Transcripts from failed tests >>>>> > partest files/neg/t7494-cyclic-dependency % scalac t7494-cyclic-dependency/ThePlugin.scala % scalac t7494-cyclic-dependency/sample_2.scala error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice! % diff files/neg/t7494-cyclic-dependency-neg.log files/neg/t7494-cyclic-dependency.check @@ -1 +1 @@ -error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice! +error: Cycle in compiler phase dependencies detected, phase cyclicdependency2 reacted twice! 0/1 passed, 1 failed (elapsed time: 00:00:04) Test Run FAILED
* | | Merge v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-masterJason Zaugg2013-05-1731-2139/+1775
|\| | | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ================================================================ Merge commit 'v2.10.1-326-g4f8c306' into merge/v2.10.1-326-g4f8c306-to-master Conflicts: src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala ================================================================ Merge -s ours 4e64a27 ([nomaster commit range]) ================================================================ Merge commit '0ae7e55' into merge/v2.10.1-326-g4f8c306-to-master Conflicts: src/compiler/scala/tools/nsc/typechecker/Macros.scala
| * Merge pull request #2512 from som-snytt/issue/partest-exec-logPaul Phillips2013-05-111-4/+5
| |\ | | | | | | Par-Test includes log in transcript of failed exec
| | * Par-Test includes log in transcript of failed execSom Snytt2013-05-101-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The previous behavior was that the Failure is generated before the log is appended to the transcript. That meant that the summary transcripts wouldn't include the log file. Luckily, the transcript would say something like "jvm > showFail-run.log".
| * | Partest can --show-diff again after incremental report.Som Snytt2013-05-032-1/+13
| |/ | | | | | | | | A flag is set in NestUI to look for "diff" in the transcript of failing tests.
| * SI-7409 Par-Test: A crash is not a DNC for neg testsSom Snytt2013-04-303-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compiler crash does not count as Does Not Compile for purposes of a negative test. Changing the test kind from "neg" to "dnc" is out of scope for this PR. Even if the user asks to update the check file with the crash result, we must prevent him from doing so. Any further attempts to update the check file with a crash will dispatch the Scala SWAT squad which will race to his location and physically restrain the user. Only Martin holds the code which will allow the squad to stand down. So make sure his cell is on next time you want to --update-check. A neg test will stop trying to compile after the first failed round, which is all that matters. By popular request, a new test outcome is emitted when the check file is updated. It is called "Updated". It even has its own short status, the double-plus that is reminiscent of diff output.
| * Partest has an optionable wait period.Som Snytt2013-04-305-13/+43
| | | | | | | | | | | | | | | | | | | | | | | | Partest --timeout "30 seconds" to time out the test run. It will not hang on timeout ("I hang with Par-Test" t-shirts not-withstanding). It's beyond the scope of this commit to investigate argument parsing: `partest --timeout "\"30 seconds"\" --pos`
| * SI-7349 Partest supports test-interfaceSom Snytt2013-04-307-194/+227
| | | | | | | | | | | | | | | | Partest uses test-interface API to invoke ScalaCheck. This obviates ad hoc output checking for result status. The context class loader is set to a loader that the scaladoc scalacheck tests can use.
| * Partest testnum field width is sensitive to total testsSom Snytt2013-04-302-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the hyphens to line up on a column within the output for a test category or "kind". ``` $ partest files/neg/t4134.scala --run Selected 1348 tests drawn from 1 named test categories, specified tests & starting 1 test in neg ok 1 - neg/t4134.scala & starting 1347 tests in run ok 1 - run/absoverride.scala ok 2 - run/amp.scala ok 3 - run/adding-growing-set.scala ```
| * SI-7358 Partest fails on scalacheck failureSom Snytt2013-04-301-14/+18
| | | | | | | | | | | | A failing test generates a test failure. The failure log is added to the transcript. The log stream is closed when done.
| * Par-Test allows redefinition of srcDir by AntSom Snytt2013-04-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Since srcDir is no longer used to extract the test kind from any given test path, it is especially benign to rely on the defness of srcDir in order to allow redefinition during an Ant run. The parameter is configured via the partest.srcdir property. Maybe the keyword should be def for definite values and red for redefinable values and ind for indefinite values. And ded for dedefinable values optionally reset to None.
| * SI-7314 Partest locates tools.jar and javacSom Snytt2013-04-182-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit lets partest locate tools.jar the way REPL does, with the addition that java.home.parent is also tried. The partest script will use JAVAC_CMD if set, or else JAVA_HOME, and will try the sibling of JAVACMD if set (on the theory that if you specify java, you are avoiding the path lookup and javac may also be in that special place), or else query the path for javac. The use cases are: no env vars, look around java.home; JDK or JAVA_HOME is set; JAVACMD is set; and finally tools.jar can live in jre/lib/ext and the fallback deep search will find it. These cases have been tried on cygwin with Java installed under s"Program${space}Files", which is usually the most brittle environment. That means tested with bash. The windows partest.bat has not been upgraded or side-graded.
| * SI-6289 Paulptest demonstrating javac errorsSom Snytt2013-04-041-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is Paul's test demonstrating that Javac errors are correctly transcribed in the test transcript. A gratuitous Scala class is added to a later round to show that the test halts after the first error. The runner must supply absolute paths to javac so that absolute paths are reported in errors and stripped away by partest. The check file is differentiated for Java 6 and 7, and partest's runner will now post-process the `diff log check` to strip the diff which does not apply.
| * SI-6289 Partest in technicolor and showing javac errorsSom Snytt2013-04-0420-1530/+1412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paulptest includes color and simplified test scarfing. Scalap tests are moved to the conventional name and location. Testicolor missed out on Josh Suereth's tweak to sort the files in a compilation round. Restore sortiness to test sources. Testicolor is due to one of Paul's branches on a timeline that apparently did not include the destruction of planet Earth and its colonies by the Xindi. Thanks also to Szabolcs Berecz for his merge effort. Merging is thankless work, but not as thankless as merging in a timeline that actually does terminate in the destruction of your home world and Enterprise. Archer had a supremely difficult choice: rescue humanity or live out his retirement with T'Pol waiting on him hand and foot? I'm sure I don't know how I'd choose.