Adding sleep in scripted test to make sure timestamp bumps [fport]

Fixes #2546. Ref #958
scripted compiler-project/error-in-invalidated has been failing
frequently on Travis CI. It seems like incremental compiler is not
catching the change in source occasionally for `changes/A2.scala`.

Forward-port of #2565
This commit is contained in:
Eugene Yokota 2016-04-18 12:15:54 -04:00 committed by Dale Wijnand
parent d9cc0c2f0b
commit 104c5f53b3
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
2 changed files with 9 additions and 1 deletions

View File

@ -1 +1,5 @@
incOptions := xsbti.compile.IncOptionsUtil.defaultIncOptions
lazy val root = (project in file(".")).
settings(
incOptions := xsbti.compile.IncOptionsUtil.defaultIncOptions,
scalaVersion := "2.11.7"
)

View File

@ -1,9 +1,13 @@
> compile
# comment out `initialized` method in A
$ copy-file changes/A1.scala src/main/scala/A.scala
$ sleep 1000
# compilation of A.scala succeeds but B.scala gets invalidated (properly) and B.scala fails to compile
-> compile
# we change A.scala to its original shape so compilation should succeed again
$ copy-file changes/A2.scala src/main/scala/A.scala
$ sleep 1000
# this fails at the moment due to use of stale class file for A, see #958 for details
> compile