Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appveyor #173

Merged
merged 3 commits into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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