Skip to content

Commit

Permalink
fix project_workspace.py
Browse files Browse the repository at this point in the history
Summary: project_workspace.py fix on windows

Test Plan: locally, CI

Reviewed By: Coneko

fbshipit-source-id: 74fa4bc
  • Loading branch information
ilya-klyuchnikov authored and Facebook Github Bot 6 committed Jun 7, 2016
1 parent 76d106d commit 0a757e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,20 @@ def run_buck(self, *command):
""" Tests that the default java.util.logging setup can maintain at least 'a couple'
of log files. """
root_directory = os.getcwd()
if platform.system() == 'Windows':
is_windows = platform.system() == 'Windows'
if is_windows:
buck_path = os.path.join(root_directory, 'bin', 'buck.bat')
args = ['cmd.exe', '/C', buck_path] + list(command)
else:
buck_path = os.path.join(root_directory, 'bin', 'buck')
args = [buck_path] + list(command)
# Pass thru our environment, except disabling buckd so that we can be sure the right buck
# is run.
child_environment = dict(os.environ)
child_environment["NO_BUCKD"] = "1"

proc = subprocess.Popen(
[buck_path] + list(command),
args,
cwd=self.test_data_directory,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand Down
2 changes: 0 additions & 2 deletions windows_failures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,5 @@
!com.facebook.buck.util.WatchmanWatcherTest#watchmanQueryWithExcludePathsAddsMatchExpressionToQueryIfDirnameNotAvailable
!com.facebook.buck.util.WatchmanWatcherTest#whenMultipleFilesThenMultipleEventsGenerated
!com.facebook.buck.util.WatchmanWatcherTest#whenNameThenModifyEventIsGenerated
!test.com.facebook.buck.cli.bootstrapper.class_loader_test.ClassLoaderTest
!test.com.facebook.buck.log.test_log_rotation.LogRotationTest
!src.com.facebook.buck.json.buck_test.TestBuckPosix
!src.com.facebook.buck.json.buck_test.TestBuckWindows

0 comments on commit 0a757e2

Please sign in to comment.