[build] Work around azure windows library loading issue (#2481)

Temporary fix until actions/virtual-environments#707 is deployed.
This commit is contained in:
Thad House
2020-04-12 10:36:25 -07:00
committed by GitHub
parent fac4e3fcfc
commit c82b8546bc
3 changed files with 38 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
import org.gradle.internal.os.OperatingSystem
apply plugin: 'cpp'
apply plugin: 'google-test-test-suite'
apply plugin: 'visual-studio'
@@ -125,12 +127,23 @@ model {
test.dependsOn it.tasks.install
test.systemProperty 'java.library.path', filePath
test.environment 'LD_LIBRARY_PATH', filePath
// Workaround for Azure issue
if (OperatingSystem.current().isWindows() && System.getenv('AGENT_ID') != null) {
test.environment 'PATH', filePath
}
test.workingDir filePath
run.dependsOn it.tasks.install
run.systemProperty 'java.library.path', filePath
run.environment 'LD_LIBRARY_PATH', filePath
run.workingDir filePath
// Workaround for Azure issue
if (OperatingSystem.current().isWindows() && System.getenv('AGENT_ID') != null) {
run.environment 'PATH', filePath
}
found = true
}
}