feat: add tests for linux (#39)

* feat: add dummy test for linux

* feat: add multiple test execution

* fix: update exec of multiple scripts for linux

* fix: execute tests with code from the branch

* fix: fail test exec if at least one test fail

* fix: typo

* wip: test if symlink work

* feat: add new test for check setup of light256 theme

* feat: when theme enabled and not set it default to dark256

* feat: increase tests coverage of checking themes activation

* refactor: rename tests_linux job

* chore: add changelog entry
This commit is contained in:
Maciej Sypien 2024-09-22 17:13:24 +02:00 committed by GitHub
parent 6595a51154
commit f01574b318
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 436 additions and 25 deletions

32
tests/run_all_linux_tests.sh Executable file
View file

@ -0,0 +1,32 @@
#!/usr/bin/env bash
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
main() {
set -e # exit on error
declare -i _countFailures
local _files
_countFailures=0
_files=$(find "$CURRENT_DIR/linux" -name "test_*" -type f)
for test in $_files; do
printf "\n"
printf "\n=============================================="
printf "\n %s" "$test"
printf "\n=============================================="
printf "\n"
bash -c "$test"
# run all and count failures
retVal=$?
if [ $retVal -eq 1 ]; then
_countFailures+=1
fi
done
# check if anything failed and fail
if [ "$_countFailures" -gt 0 ]; then
exit 1
fi
}
main "$@"