unrealircd

- supernets unrealircd source & configuration
git clone git://git.acid.vegas/unrealircd.git
Log | Files | Refs | Archive | README | LICENSE

run-tests (1717B)

      1 #!/bin/bash
      2 #
      3 # This script fires up a two-server IRC network and runs the test framework
      4 #
      5 
      6 # Exit on error:
      7 set -e
      8 
      9 # Verbose:
     10 set -x
     11 
     12 # Kill old instances
     13 killall -9 unrealircd || true
     14 # Remove old junk
     15 rm -rf cipherscan/ unrealircd-tests/
     16 
     17 if [ ! -d ~/cipherscan ]; then
     18 	# Install 'cipherscan'
     19 	git clone -q https://github.com/mozilla/cipherscan
     20 fi
     21 
     22 if [ "$HOSTNAME" = "deb8" ]; then
     23 	echo "Not running tests on Debian 8. It's LTS is EOL and trouble with running tests."
     24 	exit 0
     25 fi
     26 
     27 # Install 'unrealircd-tests'
     28 git clone -q --branch unreal60 https://github.com/unrealircd/unrealircd-tests.git unrealircd-tests
     29 cd unrealircd-tests
     30 
     31 # FreeBSD has various issues with the tests from us and others,
     32 # better set a flag to keep it simple:
     33 FREEBSD=0
     34 if uname -a|grep -q FreeBSD; then
     35 	FREEBSD=1
     36 fi
     37 
     38 # Run the test framework, testing both services:
     39 if [ "$FREEBSD" = 1 ]; then
     40 	# FreeBSD runs without services since they fail mysteriously:
     41 	./run -services none || exit 1
     42 else
     43 	# Linux tests both with anope and atheme services:
     44 	./run -services anope || exit 1
     45 	./run -services atheme || exit 1
     46 fi
     47 
     48 # Database writing/reading tests
     49 ## unencrypted:
     50 ./run -services none -boot tests/db/writing/* || exit 1
     51 ./run -services none -keepdbs -boot tests/db/reading/* || exit 1
     52 ## encrypted:
     53 ./run -services none -include db_crypted.conf -boot tests/db/writing/* || exit 1
     54 ./run -services none -include db_crypted.conf -keepdbs -boot tests/db/reading/* || exit 1
     55 
     56 # Do cipherscan test at the end
     57 # Has problems on non-Linux-64-bit, so we skip there:
     58 if [ "$FREEBSD" = 0 -a "$HOSTNAME" != "ub18-ia32" ]; then
     59 	sleep 2
     60 	cd ../extras/tests/tls
     61 	./tls-tests
     62 	cd -
     63 fi
     64 
     65 killall -15 unrealircd atheme-services services anope || true