Skip to content

Commit

Permalink
Explicitly specify root and test env prefixes
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <[email protected]>
  • Loading branch information
jjerphan committed Jan 22, 2025
1 parent cfcafd8 commit 6f354be
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,16 @@ echo "***** Done: Testing installer *****"
echo "***** Testing the usage of mamba main command *****"

echo "***** Initialize the current session for mamba *****"
export MAMBA_ROOT_PREFIX="/root/miniforge"
eval "$(mamba shell hook --shell bash)"

echo "***** Create a new environment *****"
mamba create -n testenv numpy --yes
ENV_PREFIX="/tmp/testenv"

mamba create -p $ENV_PREFIX numpy --yes -vvv

echo "***** Activate the environment with mamba *****"
mamba activate testenv
mamba activate $ENV_PREFIX

echo "***** Check that numpy is installed with mamba list *****"
mamba list | grep numpy
Expand All @@ -125,7 +128,7 @@ echo "***** Deactivate the environment *****"
mamba deactivate

echo "***** Activate the environment with conda *****"
conda activate testenv
conda activate $ENV_PREFIX

echo "***** Check that numpy is installed with python *****"
python -c "import numpy; print(numpy.__version__)"
Expand All @@ -140,7 +143,7 @@ echo "***** Deactivate the environment with conda *****"
conda deactivate

echo "***** Remove the environment *****"
mamba env remove -n testenv --yes
mamba env remove -p $ENV_PREFIX --yes

echo "***** Done: Testing mamba main command *****"

0 comments on commit 6f354be

Please sign in to comment.