4
mirror of git://git.acid.vegas/unrealircd.git synced 2024-11-14 12:06:41 +00:00
unrealircd/extras/build-tests/nix/run-tests
2020-03-29 05:16:53 -04:00

45 lines
964 B
Bash
Executable File

#!/bin/bash
#
# This script fires up a two-server IRC network and runs the test framework
#
# Exit on error:
set -e
# Verbose:
set -x
# Kill old instances
killall -9 unrealircd || true
# Remove old junk
rm -rf cipherscan/ unrealircd-tests/
if [ ! -d ~/cipherscan ]; then
# Install 'cipherscan'
git clone -q https://github.com/mozilla/cipherscan
fi
# Install 'unrealircd-tests'
git clone -q https://github.com/unrealircd/unrealircd-tests.git
cd unrealircd-tests
# Run the test framework, testing both services:
if uname -a|grep -q FreeBSD; then
# FreeBSD runs without services since they fail mysteriously:
./run -services none || exit 1
else
# Linux tests both with anope and atheme services:
./run -services anope || exit 1
./run -services atheme || exit 1
fi
# Do cipherscan test at the end
if [[ "$OSTYPE" != "freebsd"* ]]; then
sleep 2
cd ../extras/tests/tls
./tls-tests
cd -
fi
killall -15 unrealircd atheme-services services anope || true