diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-11-14 13:40:50 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-11-14 13:46:32 -0800 |
commit | 3b9bbb977e1a0e783030651e929fe2abc17f6e08 (patch) | |
tree | f0dc4066d265c293666b42b6916454fcbc060bd1 /tensorflow/core/platform/test.h | |
parent | dd8f0ded60b95c8f14a55c42f7b00d16b5b3aa8b (diff) |
XLA open-sourcing: remove dependency on util/process/subprocess.h.
Add to TensorFlow a subset of the functionality of SubProcess to support the
open-sourceable parts of XLA and support TensorFlow's own testing.
On google3 let it use the internal SubProcess from google3. In the open-source
world, use the TF implementation of the feature subset.
Modify XLA and some TF tests to use the TF SubProcess.
Change: 139114815
Diffstat (limited to 'tensorflow/core/platform/test.h')
-rw-r--r-- | tensorflow/core/platform/test.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/tensorflow/core/platform/test.h b/tensorflow/core/platform/test.h index 0046b6c3f1..295957c3d8 100644 --- a/tensorflow/core/platform/test.h +++ b/tensorflow/core/platform/test.h @@ -21,6 +21,7 @@ limitations under the License. #include "tensorflow/core/platform/macros.h" #include "tensorflow/core/platform/platform.h" +#include "tensorflow/core/platform/subprocess.h" #include "tensorflow/core/platform/types.h" // As of September 2016, we continue to attempt to avoid the use of gmock aka @@ -48,28 +49,6 @@ string TensorFlowSrcRoot(); // Returns the same value for the lifetime of the process. int RandomSeed(); -// Supports spawning and killing child processes, for use in -// multi-process testing. -class SubProcess { - public: - virtual ~SubProcess() {} - - // Starts the subprocess. Returns true on success, otherwise false. - // NOTE: This method is not thread-safe. - virtual bool Start() = 0; - - // Kills the subprocess with the given signal number. Returns true - // on success, otherwise false. - // NOTE: This method is not thread-safe. - virtual bool Kill(int signal) = 0; - - protected: - SubProcess() {} - - private: - TF_DISALLOW_COPY_AND_ASSIGN(SubProcess); -}; - // Returns an object that represents a child process that will be // launched with the given command-line arguments `argv`. The process // must be explicitly started by calling the Start() method on the |