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

Functions

def executeWorklist (input, worklist)
 

Variables

bool batchMinify = False
 
 sksl_minify = sys.argv[1]
 
 shared_module = sys.argv[2]
 
 public_module = sys.argv[3]
 
 rt_shader_module = sys.argv[4]
 
 input_root_dir = sys.argv[5]
 
 output_root_dir = sys.argv[6]
 
 input_file = sys.argv[7]
 
 all_inputs = shlex.split(reader.read())
 
list inputs = []
 
 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.minify_sksl_tests.executeWorklist (   input,
  worklist 
)

Definition at line 33 of file minify_sksl_tests.py.

33def executeWorklist(input, worklist):
34 # Invoke sksl-minify, passing in the worklist.
35 worklist.close()
36 try:
37 output = subprocess.check_output([
38 sksl_minify, worklist.name], stderr=subprocess.STDOUT).decode('utf-8', errors='ignore')
39 except subprocess.CalledProcessError as err:
40 if err.returncode != 1:
41 print("### " + input + " sksl-minify error:\n")
42 print("\n".join(err.output.decode('utf-8', errors='ignore').splitlines()))
43 sys.exit(err.returncode)
44 pass # Compile errors (exit code 1) are expected and normal in test code
45
46 # Delete the worklist file now that execution is complete.
47 os.remove(worklist.name)
48
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

Variable Documentation

◆ all_inputs

gn.minify_sksl_tests.all_inputs = shlex.split(reader.read())

Definition at line 25 of file minify_sksl_tests.py.

◆ batchMinify

bool gn.minify_sksl_tests.batchMinify = False

Definition at line 14 of file minify_sksl_tests.py.

◆ ext

gn.minify_sksl_tests.ext

Definition at line 61 of file minify_sksl_tests.py.

◆ head

gn.minify_sksl_tests.head

Definition at line 62 of file minify_sksl_tests.py.

◆ input_file

gn.minify_sksl_tests.input_file = sys.argv[7]

Definition at line 23 of file minify_sksl_tests.py.

◆ input_root_dir

gn.minify_sksl_tests.input_root_dir = sys.argv[5]

Definition at line 20 of file minify_sksl_tests.py.

◆ inputs

list gn.minify_sksl_tests.inputs = []

Definition at line 27 of file minify_sksl_tests.py.

◆ noExt

gn.minify_sksl_tests.noExt

Definition at line 61 of file minify_sksl_tests.py.

◆ output_root_dir

gn.minify_sksl_tests.output_root_dir = sys.argv[6]

Definition at line 21 of file minify_sksl_tests.py.

◆ public_module

gn.minify_sksl_tests.public_module = sys.argv[3]

Definition at line 18 of file minify_sksl_tests.py.

◆ rt_shader_module

gn.minify_sksl_tests.rt_shader_module = sys.argv[4]

Definition at line 19 of file minify_sksl_tests.py.

◆ shared_module

gn.minify_sksl_tests.shared_module = sys.argv[2]

Definition at line 17 of file minify_sksl_tests.py.

◆ sksl_minify

gn.minify_sksl_tests.sksl_minify = sys.argv[1]

Definition at line 16 of file minify_sksl_tests.py.

◆ tail

gn.minify_sksl_tests.tail

Definition at line 62 of file minify_sksl_tests.py.

◆ target

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

Definition at line 55 of file minify_sksl_tests.py.

◆ target_dir

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

Definition at line 57 of file minify_sksl_tests.py.

◆ worklist

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

Definition at line 49 of file minify_sksl_tests.py.