Skip to content
Snippets Groups Projects
Commit dbf5b772 authored by Dylan Baker's avatar Dylan Baker
Browse files

compiler/glsl: close fd's in glcpp_test.py

I would have thought falling out of scope would allow the gc to collect
these, but apparently it doesn't, and this hits an fd limit on macos.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106133


Fixes: db8cd8e3
       ("glcpp/tests: Convert shell scripts to a python script")
Signed-off-by: default avatarDylan Baker <dylan.c.baker@intel.com>
Reviewed-by: default avatarEric Anholt <eric@anholt.net>
Tested-by: default avatarVinson Lee <vlee@freedesktop.org>
parent 0e945fdf
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,8 @@ def _valgrind(glcpp, filename):
extra_args = parse_test_file(filename, nl_format='\n')
try:
_, tmpfile = tempfile.mkstemp()
fd, tmpfile = tempfile.mkstemp()
os.close(fd)
with open(filename, 'rb') as f:
proc = subprocess.Popen(
['valgrind', '--error-exitcode=31', '--log-file', tmpfile, glcpp] + extra_args,
......@@ -135,7 +136,8 @@ def _replace_test(args, replace):
total += 1
testfile = os.path.join(args.testdir, filename)
try:
_, tmpfile = tempfile.mkstemp()
fd, tmpfile = tempfile.mkstemp()
os.close(fd)
with io.open(testfile, 'rt') as f:
contents = f.read()
with io.open(tmpfile, 'wt') as f:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment