Skip to content

Commit

Permalink
re-enable all asserts in test_github_get_source_tarball_from_git
Browse files Browse the repository at this point in the history
  • Loading branch information
lexming committed Dec 18, 2024
1 parent 671d3dd commit db0704a
Showing 1 changed file with 89 additions and 89 deletions.
178 changes: 89 additions & 89 deletions test/framework/filetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2940,95 +2940,95 @@ def run_check():
'test_prefix': self.test_prefix,
}

# expected = '\n'.join([
# r' running shell command "git clone --depth 1 --branch tag_for_tests {git_repo}"',
# r" \(in .*/tmp.*\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()

# git_config['clone_into'] = 'test123'
# expected = '\n'.join([
# r' running shell command "git clone --depth 1 --branch tag_for_tests {git_repo} test123"',
# r" \(in .*/tmp.*\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='test123')
# run_check()
# del git_config['clone_into']

# git_config['recursive'] = True
# expected = '\n'.join([
# r' running shell command "git clone --depth 1 --branch tag_for_tests --recursive {git_repo}"',
# r" \(in .*/tmp.*\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()

# git_config['recurse_submodules'] = ['!vcflib', '!sdsl-lite']
# expected = '\n'.join([
# ' running shell command "git clone --depth 1 --branch tag_for_tests --recursive'
# + ' --recurse-submodules=\'!vcflib\' --recurse-submodules=\'!sdsl-lite\' {git_repo}"',
# r" \(in .*/tmp.*\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()

# git_config['extra_config_params'] = [
# 'submodule."fastahack".active=false',
# 'submodule."sha1".active=false',
# ]
# expected = '\n'.join([
# ' running shell command "git -c submodule."fastahack".active=false -c submodule."sha1".active=false'
# + ' clone --depth 1 --branch tag_for_tests --recursive'
# + ' --recurse-submodules=\'!vcflib\' --recurse-submodules=\'!sdsl-lite\' {git_repo}"',
# r" \(in .*/tmp.*\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()
# del git_config['recurse_submodules']
# del git_config['extra_config_params']

# git_config['keep_git_dir'] = True
# expected = '\n'.join([
# r' running shell command "git clone --branch tag_for_tests --recursive {git_repo}"',
# r" \(in .*/tmp.*\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()
# del git_config['keep_git_dir']

# del git_config['tag']
# git_config['commit'] = '8456f86'
# expected = '\n'.join([
# r' running shell command "git clone --no-checkout {git_repo}"',
# r" \(in .*/tmp.*\)",
# r' running shell command "git checkout 8456f86 && git submodule update --init --recursive"',
# r" \(in .*/testrepository\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()

# git_config['recurse_submodules'] = ['!vcflib', '!sdsl-lite']
# expected = '\n'.join([
# r' running shell command "git clone --no-checkout {git_repo}"',
# r" \(in .*/tmp.*\)",
# r' running shell command "git checkout 8456f86 && git submodule update --init '
# r"--recursive --recurse-submodules='!vcflib' --recurse-submodules='!sdsl-lite'\"",
# r" \(in .*/testrepository\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()

# del git_config['recursive']
# del git_config['recurse_submodules']
# expected = '\n'.join([
# r' running shell command "git clone --no-checkout {git_repo}"',
# r" \(in /.*\)",
# r' running shell command "git checkout 8456f86"',
# r" \(in /.*/testrepository\)",
# r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
# ]).format(**string_args, repo_name='testrepository')
# run_check()
expected = '\n'.join([
r' running shell command "git clone --depth 1 --branch tag_for_tests {git_repo}"',
r" \(in .*/tmp.*\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()

git_config['clone_into'] = 'test123'
expected = '\n'.join([
r' running shell command "git clone --depth 1 --branch tag_for_tests {git_repo} test123"',
r" \(in .*/tmp.*\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='test123')
run_check()
del git_config['clone_into']

git_config['recursive'] = True
expected = '\n'.join([
r' running shell command "git clone --depth 1 --branch tag_for_tests --recursive {git_repo}"',
r" \(in .*/tmp.*\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()

git_config['recurse_submodules'] = ['!vcflib', '!sdsl-lite']
expected = '\n'.join([
' running shell command "git clone --depth 1 --branch tag_for_tests --recursive'
+ ' --recurse-submodules=\'!vcflib\' --recurse-submodules=\'!sdsl-lite\' {git_repo}"',
r" \(in .*/tmp.*\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()

git_config['extra_config_params'] = [
'submodule."fastahack".active=false',
'submodule."sha1".active=false',
]
expected = '\n'.join([
' running shell command "git -c submodule."fastahack".active=false -c submodule."sha1".active=false'
+ ' clone --depth 1 --branch tag_for_tests --recursive'
+ ' --recurse-submodules=\'!vcflib\' --recurse-submodules=\'!sdsl-lite\' {git_repo}"',
r" \(in .*/tmp.*\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()
del git_config['recurse_submodules']
del git_config['extra_config_params']

git_config['keep_git_dir'] = True
expected = '\n'.join([
r' running shell command "git clone --branch tag_for_tests --recursive {git_repo}"',
r" \(in .*/tmp.*\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()
del git_config['keep_git_dir']

del git_config['tag']
git_config['commit'] = '8456f86'
expected = '\n'.join([
r' running shell command "git clone --no-checkout {git_repo}"',
r" \(in .*/tmp.*\)",
r' running shell command "git checkout 8456f86 && git submodule update --init --recursive"',
r" \(in .*/testrepository\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()

git_config['recurse_submodules'] = ['!vcflib', '!sdsl-lite']
expected = '\n'.join([
r' running shell command "git clone --no-checkout {git_repo}"',
r" \(in .*/tmp.*\)",
r' running shell command "git checkout 8456f86 && git submodule update --init '
r"--recursive --recurse-submodules='!vcflib' --recurse-submodules='!sdsl-lite'\"",
r" \(in .*/testrepository\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()

del git_config['recursive']
del git_config['recurse_submodules']
expected = '\n'.join([
r' running shell command "git clone --no-checkout {git_repo}"',
r" \(in /.*\)",
r' running shell command "git checkout 8456f86"',
r" \(in /.*/testrepository\)",
r"Archiving '.*/{repo_name}' into '{test_prefix}/target/test.tar.xz'...",
]).format(**string_args, repo_name='testrepository')
run_check()

# tarball formats that are not reproducible
bad_filenames = ['test.tar.gz', 'test.tar.bz2']
Expand Down

0 comments on commit db0704a

Please sign in to comment.