Lines Matching +full:path +full:- +full:is +full:- +full:absolute
7 # http://www.apache.org/licenses/LICENSE-2.0
10 # distributed under the License is distributed on an "AS IS" BASIS,
18 from pathlib import Path
22 "--flatc", help="path of the Flat C compiler relative to the root directory"
27 # Get the path where this script is located so we can invoke the script from
29 script_path = Path(__file__).parent.resolve()
31 # Get the root path as an absolute path, so all derived paths are absolute.
32 root_path = script_path.parent.parent.absolute()
36 flatc_exe = Path(
42 # Find and assert flatc compiler is present.
45 flatc_path = Path(root_path, flatc_exe)
55 return Path(root_path).joinpath("reflection", "reflection.fbs")
58 def make_absolute(filename, path=script_path): argument
59 return str(Path(path, filename).absolute())
62 def assert_file_exists(filename, path=script_path): argument
63 file = Path(path, filename)
68 def assert_file_doesnt_exists(filename, path=script_path): argument
69 file = Path(path, filename)
74 def get_file_contents(filename, path=script_path): argument
75 file = Path(path, filename)
103 file, needle, doesnt_contain=None, path=script_path, unlink=True argument
105 assert_file_contains(assert_file_exists(file, path), needle)
107 assert_file_doesnt_contains(assert_file_exists(file, path), doesnt_contain)
109 Path(path, file).unlink()