The environment variables test clones the heavy bitbake repository. To
speedup the test execution, we enable shallow clones for this.
Signed-off-by: Felix Moessbauer <
felix.mo...@siemens.com>
---
tests/test_environment_variables.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/test_environment_variables.py b/tests/test_environment_variables.py
index 4da839418..3b6b909e3 100644
--- a/tests/test_environment_variables.py
+++ b/tests/test_environment_variables.py
@@ -36,6 +36,7 @@ def test_build_dir_is_placed_inside_work_dir_by_default(monkeykas, tmpdir):
shutil.copytree('tests/test_environment_variables', conf_dir)
monkeykas.chdir(conf_dir)
+ monkeykas.setenv('KAS_CLONE_DEPTH', '1')
kas.kas(['checkout', 'test.yml'])
@@ -49,6 +50,7 @@ def test_build_dir_can_be_specified_by_environment_variable(monkeykas, tmpdir):
monkeykas.chdir(conf_dir)
monkeykas.setenv('KAS_BUILD_DIR', build_dir)
+ monkeykas.setenv('KAS_CLONE_DEPTH', '1')
kas.kas(['checkout', 'test.yml'])
assert os.path.exists(os.path.join(build_dir, 'conf'))
@@ -58,6 +60,7 @@ def test_ssh_agent_setup(monkeykas, tmpdir, capsys):
conf_dir = str(tmpdir / 'test_ssh_agent_setup')
shutil.copytree('tests/test_environment_variables', conf_dir)
monkeykas.chdir(conf_dir)
+ monkeykas.setenv('KAS_CLONE_DEPTH', '1')
SSH_AUTH_SOCK = '/tmp/ssh-KLTafE/agent.64708'
@@ -115,6 +118,7 @@ def _test_env_section_export(monkeykas, tmpdir, bb_env_var, bb_repo):
shutil.copytree('tests/test_environment_variables', str(conf_dir))
monkeykas.chdir(conf_dir)
+ monkeykas.setenv('KAS_CLONE_DEPTH', '1')
# Overwrite oe-init-build-env script
# BB_ENV_* filter variables are only exported by
@@ -127,6 +131,7 @@ def _test_env_section_export(monkeykas, tmpdir, bb_env_var, bb_repo):
init_build_env.chmod(0o775)
# Before executing bitbake, first get the bitbake.conf
+
kas.kas(['checkout', 'test_env.yml'])
shutil.copy(str(conf_dir / bb_repo / 'conf' / 'bitbake.conf'),
str(pathlib.Path('build') / 'conf' / 'bitbake.conf'))
--
2.39.2