Changeset 256728f for tests/pybin/tools.py
- Timestamp:
- Jun 26, 2019, 5:32:42 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 39156ed
- Parents:
- bd87a9ad (diff), b0ab7853 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/pybin/tools.py
rbd87a9ad r256728f 179 179 os.chdir(cwd) 180 180 181 def killgroup(): 182 try: 183 os.killpg(os.getpgrp(), signal.SIGINT) 184 except KeyboardInterrupt: 185 pass # expected 186 except Exception as exc: 187 print("Unexpected exception", file=sys.stderr) 188 print(exc, file=sys.stderr) 189 sys.stderr.flush() 190 sys.exit(2) 191 181 192 ################################################################################ 182 193 # file handling … … 301 312 self.end = time.time() 302 313 self.duration = self.end - self.start 314 315 def timed(src, timeout): 316 expire = time.time() + timeout 317 i = iter(src) 318 while True: 319 yield i.next(max(expire - time.time(), 0))
Note: See TracChangeset
for help on using the changeset viewer.