Flutter Engine
The Flutter Engine
Functions | Variables
gn.compile_sksl_tests Namespace Reference

Functions

def executeWorklist (input, worklist)
 
def extensionForSpirvAsm (ext)
 

Variables

bool batchCompile = True
 
 skslc = sys.argv[1]
 
 lang = sys.argv[2]
 
 settings = sys.argv[3]
 
 input_root_dir = sys.argv[4]
 
 output_root_dir = sys.argv[5]
 
 input_file = sys.argv[6]
 
 inputs = shlex.split(reader.read())
 
 worklist = tempfile.NamedTemporaryFile(suffix='.worklist', delete=False, mode='w')
 
 target = input.replace(input_root_dir, output_root_dir)
 
 target_dir = os.path.dirname(target)
 
 noExt
 
 ext
 
 head
 
 tail
 

Function Documentation

◆ executeWorklist()

def gn.compile_sksl_tests.executeWorklist (   input,
  worklist 
)

Definition at line 26 of file compile_sksl_tests.py.

26def executeWorklist(input, worklist):
27 # Invoke skslc, passing in the worklist.
28 worklist.close()
29 try:
30 output = subprocess.check_output([
31 skslc, worklist.name], stderr=subprocess.STDOUT).decode('utf-8', errors='ignore')
32 except subprocess.CalledProcessError as err:
33 if err.returncode != 1:
34 print("### " + input + " skslc error:\n")
35 #print("$ lldb out/Debug/skslc -- " + worklist.name + "\n\n")
36 print("\n".join(err.output.decode('utf-8', errors='ignore').splitlines()))
37 sys.exit(err.returncode)
38 pass # Compile errors (exit code 1) are expected and normal in test code
39
40 # Delete the worklist file now that execution is complete.
41 os.remove(worklist.name)
42
def executeWorklist(input, worklist)
def print(*args, **kwargs)
Definition: run_tests.py:49
static DecodeResult decode(std::string path)
Definition: png_codec.cpp:124
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

◆ extensionForSpirvAsm()

def gn.compile_sksl_tests.extensionForSpirvAsm (   ext)

Definition at line 43 of file compile_sksl_tests.py.

44 if (ext == '.compute'):
45 return '.comp'
46 return ext if (ext == '.frag' or ext == '.vert') else '.frag'
47

Variable Documentation

◆ batchCompile

bool gn.compile_sksl_tests.batchCompile = True

Definition at line 14 of file compile_sksl_tests.py.

◆ ext

gn.compile_sksl_tests.ext

Definition at line 63 of file compile_sksl_tests.py.

◆ head

gn.compile_sksl_tests.head

Definition at line 64 of file compile_sksl_tests.py.

◆ input_file

gn.compile_sksl_tests.input_file = sys.argv[6]

Definition at line 22 of file compile_sksl_tests.py.

◆ input_root_dir

gn.compile_sksl_tests.input_root_dir = sys.argv[4]

Definition at line 19 of file compile_sksl_tests.py.

◆ inputs

gn.compile_sksl_tests.inputs = shlex.split(reader.read())

Definition at line 24 of file compile_sksl_tests.py.

◆ lang

gn.compile_sksl_tests.lang = sys.argv[2]

Definition at line 17 of file compile_sksl_tests.py.

◆ noExt

gn.compile_sksl_tests.noExt

Definition at line 63 of file compile_sksl_tests.py.

◆ output_root_dir

gn.compile_sksl_tests.output_root_dir = sys.argv[5]

Definition at line 20 of file compile_sksl_tests.py.

◆ settings

gn.compile_sksl_tests.settings = sys.argv[3]

Definition at line 18 of file compile_sksl_tests.py.

◆ skslc

gn.compile_sksl_tests.skslc = sys.argv[1]

Definition at line 16 of file compile_sksl_tests.py.

◆ tail

gn.compile_sksl_tests.tail

Definition at line 64 of file compile_sksl_tests.py.

◆ target

gn.compile_sksl_tests.target = input.replace(input_root_dir, output_root_dir)

Definition at line 57 of file compile_sksl_tests.py.

◆ target_dir

gn.compile_sksl_tests.target_dir = os.path.dirname(target)

Definition at line 59 of file compile_sksl_tests.py.

◆ worklist

gn.compile_sksl_tests.worklist = tempfile.NamedTemporaryFile(suffix='.worklist', delete=False, mode='w')

Definition at line 51 of file compile_sksl_tests.py.