Skip to content

Commit

Permalink
fix KnownBuildRuleTypesTest
Browse files Browse the repository at this point in the history
Summary: Using rundll32.exe as a fake javac

Test Plan: locally, CI

Reviewed By: Coneko

fbshipit-source-id: 07bf1a3
  • Loading branch information
ilya-klyuchnikov authored and Facebook Github Bot 2 committed Jun 7, 2016
1 parent 203307b commit eb6b42a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions test/com/facebook/buck/rules/KnownBuildRuleTypesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import com.facebook.buck.util.FakeProcessExecutor;
import com.facebook.buck.util.ProcessExecutor;
import com.facebook.buck.util.ProcessExecutorParams;
import com.facebook.buck.util.environment.Platform;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -171,8 +172,13 @@ private DefaultJavaLibrary createJavaLibrary(KnownBuildRuleTypes buildRuleTypes)
@Test
public void whenJavacIsSetInBuckConfigConfiguredRulesCreateJavaLibraryRuleWithDifferentRuleKey()
throws IOException, NoSuchBuildTargetException, InterruptedException {
final File javac = temporaryFolder.newFile();
assertTrue(javac.setExecutable(true));
final File javac;
if (Platform.detect() == Platform.WINDOWS) {
javac = new File("C:/Windows/system32/rundll32.exe");
} else {
javac = temporaryFolder.newFile();
assertTrue(javac.setExecutable(true));
}

ImmutableMap<String, ImmutableMap<String, String>> sections = ImmutableMap.of(
"tools", ImmutableMap.of("javac", javac.toString()));
Expand Down
1 change: 0 additions & 1 deletion windows_failures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
!com.facebook.buck.python.PythonBinaryIntegrationTest
!com.facebook.buck.python.PythonSrcZipIntegrationTest
!com.facebook.buck.python.PythonTestIntegrationTest
!com.facebook.buck.rules.KnownBuildRuleTypesTest#whenJavacIsSetInBuckConfigConfiguredRulesCreateJavaLibraryRuleWithDifferentRuleKey
!com.facebook.buck.step.fs.SymCopyStepTest#testSymCopyStep
!com.facebook.buck.thrift.ThriftLibraryIntegrationTest#shouldBeAbleToConstructACxxLibraryFromThrift
!com.facebook.buck.util.ListeningProcessExecutorTest#clearsEnvWhenExplicitlySet
Expand Down

0 comments on commit eb6b42a

Please sign in to comment.