parent
520d5d5a66
commit
a1532717be
@ -22,7 +22,6 @@ import contextlib
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
|
||||
@ -39,10 +38,6 @@ from tensorflow.python.platform import flags
|
||||
from tensorflow.python.platform import test
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
|
||||
# TODO(b/35678764): Disable monkeypatched exit handlers once we find a proper
|
||||
# solution to invoke exit handlers during program exit.
|
||||
test._googletest.SetOSExit(sys.exit)
|
||||
|
||||
FLAGS = flags.FLAGS
|
||||
|
||||
flags.DEFINE_string('test_device', None,
|
||||
|
@ -47,13 +47,6 @@ unittest_main = main
|
||||
# directory only once per test binary invocation.
|
||||
_googletest_temp_dir = ''
|
||||
|
||||
_os_exit = sys.exit
|
||||
|
||||
|
||||
def SetOSExit(exit_func):
|
||||
global _os_exit
|
||||
_os_exit = exit_func
|
||||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
# pylint: disable=undefined-variable
|
||||
@ -68,7 +61,7 @@ def g_main(argv):
|
||||
except IOError:
|
||||
sys.stderr.write('Error opening TEST_SHARD_STATUS_FILE (%s). Exiting.'
|
||||
% os.environ['TEST_SHARD_STATUS_FILE'])
|
||||
_os_exit(1)
|
||||
sys.exit(1)
|
||||
finally:
|
||||
if f is not None: f.close()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user