Skip to content

Commit

Permalink
Merge pull request #173 from eatkins/appveyor
Browse files Browse the repository at this point in the history
Appveyor
  • Loading branch information
eed3si9n committed Aug 2, 2018
2 parents c7a83d4 + e081631 commit 265cba2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
build: off

init:
- git config --global core.autocrlf input

install:
- SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0
- SET PATH=%JAVA_HOME%\bin;%PATH%

- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\sbt" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://github.com/sbt/sbt/releases/download/v1.1.5/sbt-1.1.5.zip',
'C:\sbt-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sbt-bin.zip", "C:\sbt")
}
- SET PATH=C:\sbt\sbt\bin;%PATH%
- SET SBT_VER=1.1.5
- SET SBT_OPTS=-XX:MaxPermSize=2g -Xmx4g -Dfile.encoding=UTF8 -Dsbt.version=1.1.5
- SET SCALA_VERSION=2.12.6
test_script:
- sbt "++2.12.6 io/test"

cache:
- '%USERPROFILE%\.ivy2\cache'
- '%USERPROFILE%\.sbt'
4 changes: 3 additions & 1 deletion io/src/main/scala/sbt/internal/io/Milli.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import com.sun.jna.{ Native => JNANative }
import com.sun.jna.Platform

import com.sun.jna.platform.win32.Kernel32
import com.sun.jna.platform.win32.WinNT.GENERIC_READ
import com.sun.jna.platform.win32.WinNT.FILE_SHARE_READ
import com.sun.jna.platform.win32.WinNT.FILE_SHARE_WRITE
import com.sun.jna.platform.win32.WinNT.FILE_SHARE_DELETE
Expand All @@ -30,6 +29,7 @@ import com.sun.jna.platform.win32.WinBase.INVALID_HANDLE_VALUE
import com.sun.jna.platform.win32.WinBase.FILETIME
import com.sun.jna.platform.win32.WinError.ERROR_FILE_NOT_FOUND
import com.sun.jna.platform.win32.WinError.ERROR_PATH_NOT_FOUND
import com.sun.jna.platform.win32.WinError.ERROR_ACCESS_DENIED

import sbt.io.JavaMilli
import sbt.internal.io.MacJNA._
Expand Down Expand Up @@ -285,6 +285,8 @@ private object WinMilli extends MilliNative[FILETIME] {
val err = GetLastError()
if (err == ERROR_FILE_NOT_FOUND || err == ERROR_PATH_NOT_FOUND)
throw new FileNotFoundException("Not found: " + lpFileName)
else if (err == ERROR_ACCESS_DENIED)
throw new FileNotFoundException("Access denied: " + lpFileName)
else
throw new IOException("CreateFile() failed with error " + GetLastError())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,10 @@ abstract class SourceModificationWatchSpec(
// Longer timeout because there are many file system operations. This can be very expensive
// especially in the PollingWatchSpec since both the PollingWatchService and the EventMonitor
// overflow handler are hammering the file system. To minimize the conflicts, we set a long
// interval between polls in the PollingWatchService using getServiceWithPollDelay.
val deadline = 20.seconds.fromNow
// interval between polls in the PollingWatchService using getServiceWithPollDelay. The
// timeout was increased from 20.seconds to 40.seconds to address transient failures of
// this test on Appveyor windows builds.
val deadline = 40.seconds.fromNow
val monitor =
defaultMonitor(getServiceWithPollDelay(1.second), parentDir, tc = () => deadline.isOverdue)
try {
Expand Down

0 comments on commit 265cba2

Please sign in to comment.