Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
test-zstd-versions Namespace Reference

Functions

 execute (command, print_output=False, print_error=True, param_shell=False)
 
 proc (cmd_args, pipe=True, dummy=False)
 
 make (targets, pipe=True)
 
 git (args, pipe=True)
 
 get_git_tags ()
 
 create_dict (tag, dict_source_path)
 
 dict_compress_sample (tag, sample)
 
 compress_sample (tag, sample)
 
 sha1_of_file (filepath)
 
 remove_duplicates ()
 
 decompress_zst (tag)
 
 decompress_dict (tag)
 
 dict_ok (tag, dict_name, sample)
 
 create_dict (tag, dict_source_path, fallback_tag=None)
 
 zstd (tag, args, input_file, output_file)
 

Variables

str repo_url = 'https://github.com/facebook/zstd.git'
 
str tmp_dir_name = 'tests/versionsTest'
 
str make_cmd = 'make'
 
list make_args = ['-j','CFLAGS=-O1']
 
str git_cmd = 'git'
 
str test_dat_src = 'README.md'
 
str test_dat = 'test_dat'
 
str head = 'vdevel'
 
str dict_source = 'dict_source'
 
str dict_files = './zstd/programs/*.c ./zstd/lib/common/*.c ./zstd/lib/compress/*.c ./zstd/lib/decompress/*.c ./zstd/lib/dictBuilder/*.c ./zstd/lib/legacy/*.c '
 
int error_code = 0
 
str base_dir = os.getcwd() + '/..'
 
str tmp_dir = base_dir + '/' + tmp_dir_name
 
str clone_dir = tmp_dir + '/' + 'zstd'
 
str dict_source_path = tmp_dir + '/' + dict_source
 
str programs_dir = base_dir + '/programs'
 
 exist_ok
 
 alltags = get_git_tags() + [head]
 
list tags = [t for t in alltags if t >= 'v0.5.0']
 
str dst_zstd = '{}/zstd.{}'.format(tmp_dir, tag)
 
str r_dir = '{}/{}'.format(tmp_dir, tag)
 
 param_shell
 
 zstds = sorted(glob.glob('*.zst'))
 
list dict_globs
 
 files = glob.glob(dict_glob, root_dir=base_dir)
 
 file = os.path.join(base_dir, file)
 

Function Documentation

◆ compress_sample()

compress_sample ( tag,
sample )

◆ create_dict() [1/2]

create_dict ( tag,
dict_source_path )

◆ create_dict() [2/2]

create_dict ( tag,
dict_source_path,
fallback_tag = None )

◆ decompress_dict()

decompress_dict ( tag)

◆ decompress_zst()

decompress_zst ( tag)

◆ dict_compress_sample()

dict_compress_sample ( tag,
sample )

◆ dict_ok()

dict_ok ( tag,
dict_name,
sample )

◆ execute()

execute ( command,
print_output = False,
print_error = True,
param_shell = False )

◆ get_git_tags()

get_git_tags ( )

◆ git()

git ( args,
pipe = True )

◆ make()

make ( targets,
pipe = True )

◆ proc()

proc ( cmd_args,
pipe = True,
dummy = False )

◆ remove_duplicates()

remove_duplicates ( )

◆ sha1_of_file()

sha1_of_file ( filepath)

◆ zstd()

zstd ( tag,
args,
input_file,
output_file )
Zstd compress input_file to output_file.
Need this helper because 0.5.0 is broken when stdout is not a TTY.
Throws an exception if the command returns non-zero.

Variable Documentation

◆ alltags

alltags = get_git_tags() + [head]

◆ base_dir

str base_dir = os.getcwd() + '/..'

◆ clone_dir

str clone_dir = tmp_dir + '/' + 'zstd'

◆ dict_files

str dict_files = './zstd/programs/*.c ./zstd/lib/common/*.c ./zstd/lib/compress/*.c ./zstd/lib/decompress/*.c ./zstd/lib/dictBuilder/*.c ./zstd/lib/legacy/*.c '

◆ dict_globs

list dict_globs
Initial value:
1= [
2 'programs/*.c',
3 'lib/common/*.c',
4 'lib/compress/*.c',
5 'lib/decompress/*.c',
6 'lib/dictBuilder/*.c',
7 'lib/legacy/*.c',
8 'programs/*.h',
9 'lib/common/*.h',
10 'lib/compress/*.h',
11 'lib/dictBuilder/*.h',
12 'lib/legacy/*.h'
13]

◆ dict_source

str dict_source = 'dict_source'

◆ dict_source_path

str dict_source_path = tmp_dir + '/' + dict_source

◆ dst_zstd

str dst_zstd = '{}/zstd.{}'.format(tmp_dir, tag)

◆ error_code

int error_code = 0

◆ exist_ok

exist_ok

◆ file

file = os.path.join(base_dir, file)

◆ files

files = glob.glob(dict_glob, root_dir=base_dir)

◆ git_cmd

str git_cmd = 'git'

◆ head

str head = 'vdevel'

◆ make_args

list make_args = ['-j','CFLAGS=-O1']

◆ make_cmd

str make_cmd = 'make'

◆ param_shell

param_shell

◆ programs_dir

str programs_dir = base_dir + '/programs'

◆ r_dir

str r_dir = '{}/{}'.format(tmp_dir, tag)

◆ repo_url

str repo_url = 'https://github.com/facebook/zstd.git'

◆ tags

list tags = [t for t in alltags if t >= 'v0.5.0']

◆ test_dat

str test_dat = 'test_dat'

◆ test_dat_src

str test_dat_src = 'README.md'

◆ tmp_dir

str tmp_dir = base_dir + '/' + tmp_dir_name

◆ tmp_dir_name

str tmp_dir_name = 'tests/versionsTest'

◆ zstds

zstds = sorted(glob.glob('*.zst'))