File: coverage_chdir.py

package info (click to toggle)
pwntools 4.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,508 kB
  • sloc: python: 59,870; ansic: 48,351; asm: 45,047; sh: 396; makefile: 256
file content (12 lines) | stat: -rw-r--r-- 296 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
import coverage
import os
import sys

os.environ.setdefault("COVERAGE_PROCESS_START", ".coveragerc")
coverage.process_startup()

__file__ = os.path.abspath(sys.argv.pop(2))
with open(__file__) as fp:
    code = compile(fp.read(), __file__, 'exec')
os.chdir(sys.argv.pop(1))
exec(code, globals())