Skip to content

Commit 5f02006

Browse files
axonasifsagor999
authored andcommitted
refactor(tests): use a faster compiling python version and combine two tasks into one
1 parent aafee0b commit 5f02006

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tests/lang-python.yaml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,12 @@
4242
- stdout.indexOf("/workspace/.pyenv_mirror") != -1
4343

4444
# https://github.com/gitpod-io/workspace-images/issues/1000
45-
- desc: "`pyenv install <ver>` should use $HOME/.pyenv/versions/ for imagebuild env"
45+
- desc: "`pyenv install <ver>` should use $HOME/.pyenv/versions/ for imagebuild env and /workspace/.pyenv_mirror/fakeroot/versions/ for workspace-session env and multi-version shims should work"
4646
entrypoint: [bash, -c]
4747
command:
4848
[
49-
ver=3.9.0; pyenv install $ver && test -e $PYENV_ROOT/versions/$ver,
50-
]
51-
assert:
52-
- status == 0
53-
54-
- desc: "`pyenv install <ver>` should use /workspace/.pyenv_mirror/fakeroot/versions/ for workspace-session env and multi-version shims should work"
55-
entrypoint: [env, GITPOD_REPO_ROOT=/workspace, bash, -ci]
56-
command:
57-
[
58-
ver=3.9.0; pyenv install $ver && test -d $GP_PYENV_FAKEROOT/versions/$ver && test -L $PYENV_ROOT/versions/$ver && pip install cowsay && pyenv global $(pyenv version-name) $ver && cowsay Gitpod,
49+
ver=2.1.3; origdir="$PYENV_ROOT/versions/$ver" newVdir="/workspace/.pyenv_mirror/fakeroot/versions";
50+
pyenv install $ver && test -e "$origdir" && mkdir -p "$newVdir" && mv "$origdir" "$newVdir" && GITPOD_REPO_ROOT=/workspace bash -ci "pyenv install -s $ver && pip install cowsay && pyenv global $(pyenv version-name) $ver && cowsay Gitpod",
5951
]
6052
assert:
6153
- status == 0

0 commit comments

Comments
 (0)