diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-25 11:56:34 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-01-25 11:56:34 +0300 |
commit | 027f2ca58f1a80f81205b401846a8b6c70b88fee (patch) | |
tree | 342a8882400e917aade4baef299dc871fe2b3b07 | |
parent | Travis: add the badge to README (diff) | |
download | cgitize-027f2ca58f1a80f81205b401846a8b6c70b88fee.tar.gz cgitize-027f2ca58f1a80f81205b401846a8b6c70b88fee.zip |
Travis: prettier test output
Diffstat (limited to '')
-rwxr-xr-x | .travis/docker/server/setup_repo.sh | 5 | ||||
-rwxr-xr-x | .travis/docker/test.sh | 25 | ||||
-rwxr-xr-x | .travis/local/test.sh | 29 |
3 files changed, 57 insertions, 2 deletions
diff --git a/.travis/docker/server/setup_repo.sh b/.travis/docker/server/setup_repo.sh index 3d5b899..82ae711 100755 --- a/.travis/docker/server/setup_repo.sh +++ b/.travis/docker/server/setup_repo.sh @@ -5,6 +5,11 @@ set -o errexit -o nounset -o pipefail readonly local_repo_path="$HOME/test_repo" setup_local_repo() { + echo + echo ---------------------------------------------------------------------- + echo Setting up upstream repository + echo ---------------------------------------------------------------------- + mkdir -p -- "$local_repo_path" pushd -- "$local_repo_path" > /dev/null git init diff --git a/.travis/docker/test.sh b/.travis/docker/test.sh index 4e33828..464ec3d 100755 --- a/.travis/docker/test.sh +++ b/.travis/docker/test.sh @@ -41,6 +41,11 @@ spawn_ssh_agent() { } setup_ssh_agent() { + echo + echo ---------------------------------------------------------------------- + echo Setting up ssh-agent + echo ---------------------------------------------------------------------- + spawn_ssh_agent local key='ssh/client_key' @@ -64,6 +69,11 @@ setup_ssh_agent() { } docker_build() { + echo + echo ---------------------------------------------------------------------- + echo Building Docker images + echo ---------------------------------------------------------------------- + docker-compose build } @@ -73,10 +83,20 @@ setup() { } run_server() { + echo + echo ---------------------------------------------------------------------- + echo Running the server + echo ---------------------------------------------------------------------- + docker-compose up -d server } run_client() { + echo + echo ---------------------------------------------------------------------- + echo Running the client + echo ---------------------------------------------------------------------- + if [ -z "${SSH_AUTH_SOCK:+x}" ]; then dump 'SSH_AUTH_SOCK is not defined' >&2 return 1 @@ -91,6 +111,11 @@ run() { } verify() { + echo + echo ---------------------------------------------------------------------- + echo Checking the pulled repository + echo ---------------------------------------------------------------------- + pushd -- "$script_dir/client/var/output/test_repo" > /dev/null git log --oneline popd > /dev/null diff --git a/.travis/local/test.sh b/.travis/local/test.sh index 90c7cd2..5cc1fdd 100755 --- a/.travis/local/test.sh +++ b/.travis/local/test.sh @@ -8,6 +8,11 @@ readonly my_repos_path="$HOME/etc/cgit-repos/my_repos.py" readonly output_path="$HOME/var/cgit-repos/output" setup_local_repo() { + echo + echo ---------------------------------------------------------------------- + echo Setting up upstream repository + echo ---------------------------------------------------------------------- + mkdir -p -- "$local_repo_path" pushd -- "$local_repo_path" > /dev/null @@ -23,11 +28,16 @@ setup_local_repo() { } setup_cgit_repos_conf() { + echo + echo ---------------------------------------------------------------------- + echo cgit-repos.conf + echo ---------------------------------------------------------------------- + local conf_dir conf_dir="$( dirname -- "$cgit_repos_conf_path" )" mkdir -p -- "$conf_dir" - cat <<EOF > "$cgit_repos_conf_path" + cat <<EOF | tee "$cgit_repos_conf_path" [DEFAULT] my_repos = $my_repos_path @@ -36,11 +46,16 @@ EOF } setup_my_repos_py() { + echo + echo ---------------------------------------------------------------------- + echo my_repos.py + echo ---------------------------------------------------------------------- + local conf_dir conf_dir="$( dirname -- "$my_repos_path" )" mkdir -p -- "$conf_dir" - cat <<EOF > "$my_repos_path" + cat <<EOF | tee "$my_repos_path" from pull.repo import Repo @@ -61,10 +76,20 @@ setup() { } run() { + echo + echo ---------------------------------------------------------------------- + echo Pulling repository from upstream + echo ---------------------------------------------------------------------- + python3 -m pull.main --config "$cgit_repos_conf_path" } verify() { + echo + echo ---------------------------------------------------------------------- + echo Checking the pulled repository + echo ---------------------------------------------------------------------- + pushd -- "$output_path" > /dev/null cd -- test_repo git log --oneline |