steps:
- script: |
set -e
- virtualenv -p /usr/bin/python3 /tmp/venvhtml
+ python3 -m venv /tmp/venvhtml
. /tmp/venvhtml/bin/activate
pip install -r doc/sphinx/requirements.txt
make htmldocs KDOC_WERROR=1
git config --global user.email bmeng.cn@gmail.com
git config --global --add safe.directory $(work_dir)
export USER=azure
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r test/py/requirements.txt \
-r tools/binman/requirements.txt \
- script: |
git config --global --add safe.directory $(work_dir)
export USER=azure
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r test/py/requirements.txt \
-r tools/binman/requirements.txt \
if [ -n "\${BUILD_ENV}" ]; then
export \${BUILD_ENV};
fi
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r tools/binman/requirements.txt \
-r tools/buildman/requirements.txt \
# make environment variables available as tests are running inside a container
export BUILDMAN="${BUILDMAN}"
git config --global --add safe.directory ${WORK_DIR}
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r tools/binman/requirements.txt \
-r tools/buildman/requirements.txt
export BINMAN_INDIRS=/tmp;
fi
# Prepare python environment
- - virtualenv -p /usr/bin/python3 /tmp/venv;
+ - python3 -m venv /tmp/venv;
. /tmp/venv/bin/activate;
pip install -r test/py/requirements.txt -r tools/binman/requirements.txt
-r tools/buildman/requirements.txt -r tools/u_boot_pylib/requirements.txt
- ${HOST}
script:
# Prepare python environment
- - virtualenv -p /usr/bin/python3 /tmp/venv;
+ - python3 -m venv /tmp/venv;
. /tmp/venv/bin/activate;
pip install -r tools/binman/requirements.txt
-r tools/buildman/requirements.txt
docs:
extends: .testsuites
script:
- - virtualenv -p /usr/bin/python3 /tmp/venvhtml
+ - python3 -m venv /tmp/venvhtml
- . /tmp/venvhtml/bin/activate
- pip install -r doc/sphinx/requirements.txt
- make htmldocs KDOC_WERROR=1
git config --global user.email trini@konsulko.com;
git config --global --add safe.directory "${CI_PROJECT_DIR}";
export USER=gitlab;
- virtualenv -p /usr/bin/python3 /tmp/venv;
+ python3 -m venv /tmp/venv;
. /tmp/venv/bin/activate;
pip install -r test/py/requirements.txt -r tools/binman/requirements.txt
-r tools/buildman/requirements.txt -r tools/patman/requirements.txt
extends: .testsuites
script:
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
- - virtualenv -p /usr/bin/python3 /tmp/venv
+ - python3 -m venv /tmp/venv
- . /tmp/venv/bin/activate
- pip install -r test/py/requirements.txt -r tools/binman/requirements.txt
-r tools/buildman/requirements.txt -r tools/patman/requirements.txt
python3-pkg-resources python3-pycryptodome python3-pyelftools \
python3-pytest python3-pytest-xdist python3-sphinxcontrib.apidoc \
python3-sphinx-rtd-theme python3-subunit python3-testtools \
- python3-virtualenv swig uuid-dev
+ python3-venv swig uuid-dev
SUSE based
~~~~~~~~~~
`test/py/tests/fs_helper.py` which shall be used in any tests that require
creating disk images.
-Using `virtualenv` to provide requirements
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Using a Python sandbox to provide requirements
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The recommended way to run the test suite, in order to ensure reproducibility
-is to use `virtualenv` to set up the necessary environment. This can be done
-via the following commands:
+is to use a Python sandbox such as `python -m venv` to set up the necessary
+environment. This can be done via the following commands:
.. code-block:: console
$ cd /path/to/u-boot
- $ sudo apt-get install python3 python3-virtualenv
- $ virtualenv -p /usr/bin/python3 venv
+ $ sudo apt-get install python3 python3-venv
+ $ python3 -m venv venv
$ . ./venv/bin/activate
$ pip install -r test/py/requirements.txt
diff = self.call_make_environment(tchn, full_path=True)[0]
self.assertEqual({b'LC_ALL': b'C'}, diff)
- # Test that virtualenv is handled correctly
+ # Test that Python sandbox is handled correctly
tchn.override_toolchain = False
sys.prefix = '/some/venv'
env = dict(os.environb)
elif self.cross:
env[b'CROSS_COMPILE'] = tools.to_bytes(wrapper + self.cross)
- # Detect a Python virtualenv and avoid defeating it
+ # Detect a Python sandbox and avoid defeating it
if sys.prefix != sys.base_prefix:
paths = env[b'PATH'].split(b':')
new_paths = []
python3-dev \
python3-pip \
python3-sphinx \
- python3-virtualenv \
+ python3-venv \
rpm2cpio \
sbsigntool \
socat \
texinfo \
util-linux \
uuid-dev \
- virtualenv \
vboot-kernel-utils \
vboot-utils \
xilinx-bootgen \
RUN wget -O /tmp/buildman-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/buildman/requirements.txt
RUN wget -O /tmp/patman-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/patman/requirements.txt
RUN wget -O /tmp/u_boot_pylib-requirements.txt https://source.denx.de/u-boot/u-boot/-/raw/master/tools/u_boot_pylib/requirements.txt
-RUN virtualenv -p /usr/bin/python3 /tmp/venv && \
+RUN python3 -m venv /tmp/venv && \
. /tmp/venv/bin/activate && \
pip install -r /tmp/pytest-requirements.txt \
-r /tmp/sphinx-requirements.txt \
if build_dir:
prefix = 'PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools ' % build_dir
- # Detect a Python virtualenv and use 'coverage' instead
+ # Detect a Python sandbox and use 'coverage' instead
covtool = ('python3-coverage' if sys.prefix == sys.base_prefix else
'coverage')