Use a temp dir as cache dir when running tests during freezing on linux
This commit is contained in:
parent
9ad5ef8b2d
commit
5fdeb3b3b4
@ -8,6 +8,7 @@ import shutil
|
|||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import tarfile
|
import tarfile
|
||||||
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from bypy.constants import (
|
from bypy.constants import (
|
||||||
@ -194,7 +195,12 @@ def main():
|
|||||||
ext_dir = globals()['ext_dir']
|
ext_dir = globals()['ext_dir']
|
||||||
if not args.skip_tests:
|
if not args.skip_tests:
|
||||||
run_tests = iv['run_tests']
|
run_tests = iv['run_tests']
|
||||||
run_tests(None, os.path.join(ext_dir, 'src'))
|
with tempfile.TemporaryDirectory() as tdir:
|
||||||
|
os.environ['KITTY_CACHE_DIRECTORY'] = tdir
|
||||||
|
try:
|
||||||
|
run_tests(None, os.path.join(ext_dir, 'src'))
|
||||||
|
finally:
|
||||||
|
del os.environ['KITTY_CACHE_DIRECTORY']
|
||||||
env = Env(os.path.join(ext_dir, kitty_constants['appname']))
|
env = Env(os.path.join(ext_dir, kitty_constants['appname']))
|
||||||
copy_libs(env)
|
copy_libs(env)
|
||||||
copy_python(env)
|
copy_python(env)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user