Add unit test for mgr-gitlab-clone, run in CI

This commit is contained in:
2022-03-23 15:00:22 -07:00
parent e05c409207
commit e63f1ce9cc
3 changed files with 30 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
gitlab_start_log_section() {
NAME="$1"
HEADER="2"
echo -e "\e[0Ksection_start:`date +%s`:${NAME}\r\e[0K${HEADER}"
}
gitlab_end_log_section() {
NAME="$1"
echo -e "\e[0Ksection_start:`date +%s`:${NAME}\r\e[0K${HEADER}"
}

View File

@@ -1,3 +1,17 @@
#!/bin/bash
emacs --batch --debug-init --load ./.emacs.d/init.el
set -e -o pipefail
SRC_ROOT="$(dirname "${BASH_SOURCE}")"
source "$SRC_ROOT/gitlab-utils.sh"
# Load emacs
gitlab_start_log_section "test_init" "Running Emacs"
emacs --batch --debug-init -l ./.emacs.d/init.el
gitlab_end_log_section "test_init"
# Run tests
gitlab_start_log_section "run_unit_tests" "Running Unit Tests"
emacs --batch --debug-init -l ert -l ./.emacs.d/init.el -f ert-run-tests-batch-and-exit
gitlab_end_log_section "run_unit_tests"