feat: add multiple test execution

This commit is contained in:
Maciej Sypien 2024-09-21 09:45:50 +02:00
parent 937fa5f529
commit 4944b6ecc0
No known key found for this signature in database
GPG key ID: 10BC01EDA6827DC8
5 changed files with 71 additions and 31 deletions

39
tests/tmux_helpers.sh Normal file
View file

@ -0,0 +1,39 @@
#!/bin/bash
helper_teardown_tmux() {
rm -rf ~/.tmux.conf
rm -rf ~/.tmux/
tmux kill-server >/dev/null 2>&1
}
helper_tearup_linux_tmux() {
if [[ "$(uname)" != "Linux" ]]; then
echo "NOT LINUX. Failed & exit."
exit 1
fi
# install software
sudo apt update -y
sudo apt install -y tmux git
# download TPM
mkdir -p ~/.tmux/plugins/
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
}
helper_print_fail_and_exit() {
local _msg="${1:-}"
printf "FAIL. %s\n" "${_msg}"
exit 1
}
helper_print_success_and_exit() {
local _msg="${1:-}"
printf "SUCCESS. %s\n" "${_msg}"
exit 0
}
# install TMP plugins with command
helper_install_tpm_plugins() {
bash -c "${HOME}/.tmux/plugins/tpm/scripts/install_plugins.sh install_plugins"
}