![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
Data Structures | |
class | Options |
class | TestCase |
class | TestSuite |
Functions | |
bool | exclude_dir (str dirname) |
bool | exclude_file (str filename) |
bytes | read_file (str filename) |
str | diff (bytes a, bytes b) |
typing.Tuple[typing.Optional[bytes], bytes] | pop_line (bytes data) |
bool | glob_line_matches (bytes actual, bytes expect) |
bytes | glob_diff (bytes actual, bytes expect) |
TestSuites | get_all_tests (Options options) |
TestSuites | resolve_listed_tests (typing.List[str] tests, Options options) |
bool | run_tests (TestSuites test_suites, Options options) |
None | setup_zstd_symlink_dir (str zstd_symlink_dir, str zstd) |
Variables | |
list | ZSTD_SYMLINKS |
dict | EXCLUDED_DIRS |
dict | EXCLUDED_BASENAMES |
list | EXCLUDED_SUFFIXES |
TestSuites = typing.Dict[str, typing.List[str]] | |
CLI_TEST_DIR = os.path.dirname(sys.argv[0]) | |
REPO_DIR = os.path.join(CLI_TEST_DIR, "..", "..") | |
PROGRAMS_DIR = os.path.join(REPO_DIR, "programs") | |
TESTS_DIR = os.path.join(REPO_DIR, "tests") | |
ZSTD_PATH = os.path.join(PROGRAMS_DIR, "zstd") | |
ZSTDGREP_PATH = os.path.join(PROGRAMS_DIR, "zstdgrep") | |
ZSTDLESS_PATH = os.path.join(PROGRAMS_DIR, "zstdless") | |
DATAGEN_PATH = os.path.join(TESTS_DIR, "datagen") | |
parser | |
action | |
help | |
default | |
type | |
int | |
nargs | |
args = parser.parse_args() | |
timeout | |
test_dir | |
bin_dir = os.path.abspath(os.path.join(args.test_dir, "bin")) | |
zstd_symlink_dir = os.path.join(bin_dir, "symlinks") | |
scratch_dir = os.path.join(args.test_dir, "scratch") | |
dict | env = {} |
opts | |
TestSuites | tests = get_all_tests(opts) |
bool | success = run_tests(tests, opts) |
Should files under the directory :dirname: be excluded from the test runner?
TestSuites get_all_tests | ( | Options | options | ) |
Find all the test in the test directory and return the test suites.
Returns None if the :actual: content matches the expected glob :expect:, otherwise returns the diff bytes.
Does the `actual` line match the expected glob line `expect`?
Pop the first line from :data: and returns the first line and the remainder of the data as a tuple. If :data: is empty, returns :(None, data):. Otherwise the first line always ends in a :\n:, even if it is the last line and :data: doesn't end in :\n:.
TestSuites resolve_listed_tests | ( | typing.List[str] | tests, |
Options | options ) |
Resolve the list of tests passed on the command line into their respective test suites. Tests can either be paths, or test names relative to the test directory.
bool run_tests | ( | TestSuites | test_suites, |
Options | options ) |
Runs all the test in the :test_suites: with the given :options:. Prints the results to stdout.
action |
args = parser.parse_args() |
bin_dir = os.path.abspath(os.path.join(args.test_dir, "bin")) |
CLI_TEST_DIR = os.path.dirname(sys.argv[0]) |
DATAGEN_PATH = os.path.join(TESTS_DIR, "datagen") |
default |
dict env = {} |
dict EXCLUDED_BASENAMES |
dict EXCLUDED_DIRS |
list EXCLUDED_SUFFIXES |
help | ( | void | ) |
int |
nargs |
opts |
parser |
PROGRAMS_DIR = os.path.join(REPO_DIR, "programs") |
REPO_DIR = os.path.join(CLI_TEST_DIR, "..", "..") |
scratch_dir = os.path.join(args.test_dir, "scratch") |
test_dir |
TestSuites tests = get_all_tests(opts) |
TESTS_DIR = os.path.join(REPO_DIR, "tests") |
timeout |
type |
ZSTD_PATH = os.path.join(PROGRAMS_DIR, "zstd") |
zstd_symlink_dir = os.path.join(bin_dir, "symlinks") |
list ZSTD_SYMLINKS |
ZSTDGREP_PATH = os.path.join(PROGRAMS_DIR, "zstdgrep") |
ZSTDLESS_PATH = os.path.join(PROGRAMS_DIR, "zstdless") |