@@ -4,13 +4,14 @@ set -ex
44
55echo " ***** Start: Testing Miniforge installer *****"
66
7- CONSTRUCT_ROOT=" ${CONSTRUCT_ROOT:- ${PWD} } "
8- cd " ${CONSTRUCT_ROOT} "
9-
107export CONDA_PATH=" ${HOME} /miniforge"
118MAMBA_VERSION=$( grep " set mamba_version" Miniforge3/construct.yaml | cut -d ' =' -f 2 | cut -d ' "' -f 2)
129export MAMBA_VERSION
1310
11+ CONSTRUCT_ROOT=" ${CONSTRUCT_ROOT:- ${PWD} } "
12+
13+ cd " ${CONSTRUCT_ROOT} "
14+
1415echo " ***** Get the installer *****"
1516ls build/
1617if [[ " $( uname) " == MINGW* ]]; then
7374 conda list
7475fi
7576
76- echo " + Mamba does not warn (check that there is no warning on stderr) and returns exit code 0"
77- mamba --help 2> stderr.log || cat stderr.log
78- test ! -s stderr.log
79- rm -f stderr.log
80-
81- echo " + mamba info"
82- mamba info
83-
84- echo " + mamba config sources"
85- mamba config sources
86-
87- echo " + mamba config list"
88- mamba config list
89-
90- echo " + Testing mamba version (i.e. ${MAMBA_VERSION} )"
91- mamba info --json | python -c " import sys, json; info = json.loads(sys.stdin.read()); assert info['mamba version'] == '${MAMBA_VERSION} ', info"
92- echo " OK"
93-
94- echo " + Testing mamba channels"
95- mamba info --json | python -c " import sys, json; info = json.loads(sys.stdin.read()); assert any('conda-forge' in c for c in info['channels']), info"
96- echo " OK"
97-
9877echo " ***** Python path *****"
9978python -c " import sys; print(sys.executable)"
10079python -c " import sys; assert 'miniforge' in sys.executable"
@@ -107,43 +86,3 @@ python -c "import platform; print(platform.machine())"
10786python -c " import platform; print(platform.release())"
10887
10988echo " ***** Done: Testing installer *****"
110-
111- echo " ***** Testing the usage of mamba main commands *****"
112-
113- echo " ***** Initialize the current session for mamba *****"
114- eval " $( mamba shell hook --shell bash) "
115-
116- echo " ***** Create a new environment *****"
117- ENV_PREFIX=" /tmp/testenv"
118-
119- mamba create -p $ENV_PREFIX numpy --yes -vvv
120-
121- echo " ***** Activate the environment with mamba *****"
122- mamba activate $ENV_PREFIX
123-
124- echo " ***** Check that numpy is installed with mamba list *****"
125- mamba list | grep numpy
126-
127- echo " ***** Deactivate the environment *****"
128- mamba deactivate
129-
130- echo " ***** Activate the environment with conda *****"
131- conda activate $ENV_PREFIX
132-
133- echo " ***** Check that numpy is installed with python *****"
134- python -c " import numpy; print(numpy.__version__)"
135-
136- echo " ***** Remove numpy *****"
137- mamba remove numpy --yes
138-
139- echo " ***** Check that numpy is not installed with mamba list *****"
140- mamba list | grep -v numpy
141-
142- echo " ***** Deactivate the environment with conda *****"
143- conda deactivate
144-
145- echo " ***** Remove the environment *****"
146- mamba env remove -p $ENV_PREFIX --yes
147-
148- echo " ***** Done: Testing mamba main commands *****"
149-
0 commit comments