Skip to content

Commit

Permalink
make the native backend tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Sep 1, 2018
1 parent 7614765 commit e582161
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/python/pants/engine/isolated_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from future.utils import binary_type, text_type

from pants.engine.fs import DirectoryDigest
from pants.engine.fs import EMPTY_SNAPSHOT, DirectoryDigest
from pants.engine.rules import RootRule, rule
from pants.engine.selectors import Select
from pants.util.objects import Exactly, TypeCheckError, datatype
Expand Down Expand Up @@ -68,6 +68,16 @@ def __new__(
jdk_home=jdk_home,
)

@classmethod
def create_from_input_snapshot(cls, argv, snapshot, description, **kwargs):
return cls(argv=argv, input_files=snapshot.directory_digest, description=text_type(description),
**kwargs)

@classmethod
def create_with_empty_snapshot(cls, argv, description, **kwargs):
return cls.create_from_input_snapshot(
argv=argv, snapshot=EMPTY_SNAPSHOT, description=description, **kwargs)


class ExecuteProcessResult(datatype([('stdout', binary_type),
('stderr', binary_type),
Expand Down

0 comments on commit e582161

Please sign in to comment.