lasp/scripts/test.sh

18 lines
359 B
Bash
Raw Normal View History

2023-07-14 08:12:42 +00:00
#/bin/sh
# This script is run in the CI/CD system to test the code.
python3 -m venv testenv
# Activate environment
. testenv/bin/activate
pip install .
arch_os_line='NAME="Arch Linux"'
if [[ $(sed -n "/^${arch_os_line}/p;q" /etc/os-release) == ${arch_os_line} ]]; then
# Arch Linux
pytest
else
# Not Arch Linux, assuming Ubuntu
pytest-3
fi