mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-28 07:36:38 +02:00
65 lines
1.2 KiB
Bash
Executable File
65 lines
1.2 KiB
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
|
|
|
|
# Install packages
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
brew install git || true
|
|
brew install python || true
|
|
gem install bundler || true
|
|
gem install rake || true
|
|
gem install rspec || true
|
|
else
|
|
sudo apt-get install git python rake -y
|
|
gem install bundler -v "~>1.0"
|
|
fi
|
|
|
|
# Install 'ircfly'
|
|
git clone -q https://github.com/unrealircd/ircfly.git
|
|
cd ircfly
|
|
bundle install
|
|
bundle exec rake build
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
bundle exec rake install
|
|
else
|
|
sudo rake install
|
|
fi
|
|
cd ..
|
|
|
|
# Install 'cipherscan'
|
|
git clone -q https://github.com/mozilla/cipherscan
|
|
|
|
# Install 'unrealircd-tests'
|
|
git clone -q https://github.com/unrealircd/unrealircd-tests.git
|
|
cd unrealircd-tests
|
|
bundle install
|
|
mv config.yaml.example config.yaml
|
|
|
|
# Start the IRC servers
|
|
cp ircdconfig/* ~/unrealircd/conf/
|
|
cd ~/unrealircd
|
|
bin/unrealircd -f hub.conf
|
|
bin/unrealircd -f irc1.conf
|
|
bin/unrealircd -f irc2.conf
|
|
cd -
|
|
|
|
# Do cipherscan test
|
|
sleep 2
|
|
cd ../extras/tests/tls
|
|
./tls-tests
|
|
cd -
|
|
|
|
# Back in unrealircd-tests, run the tests!
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
bundle exec rake
|
|
else
|
|
rake
|
|
fi
|