Add ircd-seven

This commit is contained in:
Valentin Lorentz 2021-02-27 14:15:16 +01:00
parent 407fe663d1
commit 72eee6114f
5 changed files with 89 additions and 2 deletions

58
.github/workflows/ircd-seven.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: irctest with ircd-seven
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cache
$GITHUB_WORKSPACE/ircd-seven
key: ${{ runner.os }}-ircd-seven
- name: Install dependencies
run: |
sudo apt-get install libhyperscan-dev
python -m pip install --upgrade pip
pip install pytest -r requirements.txt
- name: Checkout ircd-seven
uses: actions/checkout@v2
with:
repository: freenode/ircd-seven
ref: ircd-seven-1.1.9
path: ircd-seven
- name: Build ircd-seven
run: |
cd $GITHUB_WORKSPACE/ircd-seven/
autoconf
./configure --prefix=$HOME/.local/
make # can't use -j, may cause 'y.tab.h: No such file or directory'
make install
mv $HOME/.local/bin/ircd $HOME/.local/bin/ircd-seven
- name: Test with pytest
run: |
# testNakWhole fails because ircd-seven sends a trailing space in CAP ACK
# testPartMessage and testBasicPartRfc2812 fail because ircd-seven adds quotes around the message
# testListOne fails because ircd-seven makes channels secret by default
PATH=~/.local/bin:$PATH pytest --controller=irctest.controllers.ircd_seven -k 'not Oragono and not deprecated and not strict and not testDoubleKickMessages and not testNakWhole and not testPartMessage and not testBasicPartRfc2812 and not testListOne'

View File

@ -104,6 +104,18 @@ cd ~/irctest
pytest --controller irctest.controllers.charybdis -k 'not Oragono and not deprecated and not strict'
```
To run (server) tests on ircd-seven:
```
cd /tmp/
git clone https://github.com/freenode/ircd-seven.git
autoconf
./configure --prefix=$HOME/.local/
make # can't use -j, may cause 'y.tab.h: No such file or directory'
make install
mv $HOME/.local/bin/ircd $HOME/.local/bin/ircd-seven
```
To run (server) tests on InspIRCd:
```

View File

@ -0,0 +1,10 @@
from .charybdis import CharybdisController
class IrcdSevenController(CharybdisController):
software_name = "ircd-seven"
binary_name = "ircd-seven"
def get_irctest_controller_class():
return IrcdSevenController

View File

@ -334,6 +334,7 @@ class JoinTestCase(cases.BaseServerTestCase):
self.sendLine(1, "MODE #chan +t")
self.getMessages(1)
self.getMessages(2)
self.sendLine(2, "TOPIC #chan :T0P1C")
m = self.getMessage(2)
self.assertMessageEqual(

View File

@ -23,10 +23,16 @@ class MultiPrefixTestCase(cases.BaseServerTestCase):
# TODO(dan): Make sure +v is voice
self.sendLine(1, "NAMES #chan")
reply = self.getMessage(1)
self.assertMessageEqual(
self.getMessage(1),
reply,
command="353",
params=["foo", "=", "#chan", "@+foo"],
fail_msg="Expected NAMES response (353) with @+foo, got: {msg}",
)
self.assertMessageEqual(
reply,
command="353",
params=["foo", reply.params[1], "#chan", "@+foo"],
fail_msg="Expected NAMES response (353) with @+foo, got: {msg}",
)
self.getMessages(1)