Debian Codegraph @

llvm/test/Other/ChangePrinters/DotCfg/lit.local.cfg

raw
1 import os
2 import subprocess
3
4
5 def have_needed_dot_support():
6 if not os.path.exists("/usr/bin/dot"):
7 return False
8
9 try:
10 ld_cmd = subprocess.Popen(
11 ["/usr/bin/dot", "-T?"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
12 )
13 ld_err = ld_cmd.stderr.read().decode()
14 ld_cmd.wait()
15 except:
16 return False
17
18 return "pdf" in ld_err
19
20
21 if not have_needed_dot_support():
22 config.unsupported = True