No description
Find a file
Ava Affine 8c91778fe1 import to github
Signed-off-by: Ava Affine <ava@sunnypup.io>
2025-01-17 15:28:16 -08:00
.gitignore import to github 2025-01-17 15:28:16 -08:00
common.sh import to github 2025-01-17 15:28:16 -08:00
LICENSE import to github 2025-01-17 15:28:16 -08:00
nginx.sh import to github 2025-01-17 15:28:16 -08:00
README.md import to github 2025-01-17 15:28:16 -08:00
test.sh import to github 2025-01-17 15:28:16 -08:00
virt.sh import to github 2025-01-17 15:28:16 -08:00

Testing Framework

This is a set of scripts that roughly does the following:

  • launches available libvirt VMs on host
  • synchronizes code and test code to each VM
  • runs a build script on each VM
  • runs a test script on each VM
  • collects job status and logs and stores them locally

Prerequisites

  • SECRET.sh must contain the following
    • USERN=
    • PASSP=
  • sshpass, virsh, libvirt, etc
  • cloned repos of nginx, nginx-tests, and nginx-otel

About those VMs....

  • hostname and libvirt domain name need to be same for each
  • username and password should be the same on all of them
  • whatever your test functions need (see nginx.sh)
    • git
    • make
    • gcc
    • zlib
    • pcre
    • openssl
    • rsyncz
    • perl and perl-utils (for prove)

For Otel module build and tests:

  • cmake
  • c-ares
  • linux-headers
  • g++ / clang++ / etc

FreeBSD

  • need to install bash
  • need to set login shell to bash

Fedora

  • install zlib-ng-compat-devel and zlib-ng-compat-static for zlib, not zlibrary-devel or zlib-ng-devel.
  • fedora also seems to need the openssl-devel-engine package.

Alpine

  • need to install clang instead of gcc

Usage

Invoke test.sh with some or all of the following flags:

  • --nginx <nginx> takes an nginx code directory and builds it on remote hosts
  • --otel <otel> takes an nginx-otel directory and builds it on remote hosts
  • --tests <tests> takes an nginx-tests directory and runs tests on remote hosts requires that --nginx=... also be supplied. If otel was supplied this also triggers testing in otel directory.

Logs are in logging directory shown. They are split out into files per VM per phase. User may set test_log_dir to provide their own logging directory.