Allow enabling debug output via environment variables. (#284)

This commit is contained in:
Sadie Powell
2024-07-24 19:35:37 +01:00
committed by GitHub
parent a132440789
commit 75d9040d37
23 changed files with 209 additions and 94 deletions

View File

@ -453,7 +453,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
bahamut
timeout-minutes: 30
@ -492,7 +494,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
bahamut-anope
timeout-minutes: 30
@ -525,7 +529,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
bahamut-atheme
timeout-minutes: 30
@ -565,7 +571,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/go/sbin:~/go/bin:~/go:$PATH
make ergo
timeout-minutes: 30
@ -604,7 +612,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
hybrid
timeout-minutes: 30
@ -637,7 +647,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH
make inspircd
timeout-minutes: 30
@ -676,7 +688,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH make
inspircd-anope
timeout-minutes: 30
@ -715,7 +729,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
ircu2
timeout-minutes: 30
@ -743,7 +759,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
limnoria
timeout-minutes: 30
@ -781,7 +799,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
nefarious
timeout-minutes: 30
@ -814,7 +834,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local//sbin:~/.local//bin:~/.local/:$PATH
make ngircd
timeout-minutes: 30
@ -853,7 +875,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local//sbin:~/.local//bin:~/.local/:$PATH make
ngircd-anope
timeout-minutes: 30
@ -886,7 +910,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local//sbin:~/.local//bin:~/.local/:$PATH
make ngircd-atheme
timeout-minutes: 30
@ -925,7 +951,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
plexus4
timeout-minutes: 30
@ -972,7 +1000,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=$GITHUB_WORKSPACE/sable/target/debug/sbin:$GITHUB_WORKSPACE/sable/target/debug/bin:$GITHUB_WORKSPACE/sable/target/debug:$PATH
make sable
timeout-minutes: 30
@ -1005,7 +1035,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
solanum
timeout-minutes: 30
@ -1032,7 +1064,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
sopel
timeout-minutes: 30
@ -1070,7 +1104,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
thelounge
timeout-minutes: 30
@ -1103,7 +1139,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH
make unrealircd
timeout-minutes: 30
@ -1136,7 +1174,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH
make unrealircd-5
timeout-minutes: 30
@ -1175,7 +1215,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH make
unrealircd-anope
timeout-minutes: 30
@ -1208,7 +1250,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH
make unrealircd-atheme
timeout-minutes: 30
@ -1252,7 +1296,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH
IRCTEST_DLK_PATH="${{ github.workspace }}/Dlk-Services" IRCTEST_WP_CLI_PATH="${{
github.workspace }}/wp-cli.phar" IRCTEST_WP_ZIP_PATH="${{ github.workspace

View File

@ -126,7 +126,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH
make inspircd
timeout-minutes: 30
@ -165,7 +167,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH make
inspircd-anope
timeout-minutes: 30
@ -198,7 +202,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH
make inspircd-atheme
timeout-minutes: 30

View File

@ -496,7 +496,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
bahamut
timeout-minutes: 30
@ -535,7 +537,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
bahamut-anope
timeout-minutes: 30
@ -568,7 +572,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
bahamut-atheme
timeout-minutes: 30
@ -601,7 +607,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
charybdis
timeout-minutes: 30
@ -641,7 +649,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/go/sbin:~/go/bin:~/go:$PATH
make ergo
timeout-minutes: 30
@ -680,7 +690,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
hybrid
timeout-minutes: 30
@ -713,7 +725,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH
make inspircd
timeout-minutes: 30
@ -752,7 +766,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH make
inspircd-anope
timeout-minutes: 30
@ -785,7 +801,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/inspircd/sbin:~/.local/inspircd/bin:~/.local/inspircd:$PATH
make inspircd-atheme
timeout-minutes: 30
@ -835,7 +853,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
irc2
timeout-minutes: 30
@ -874,7 +894,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
ircu2
timeout-minutes: 30
@ -901,7 +923,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
limnoria
timeout-minutes: 30
@ -939,7 +963,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
nefarious
timeout-minutes: 30
@ -972,7 +998,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local//sbin:~/.local//bin:~/.local/:$PATH
make ngircd
timeout-minutes: 30
@ -1011,7 +1039,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local//sbin:~/.local//bin:~/.local/:$PATH make
ngircd-anope
timeout-minutes: 30
@ -1044,7 +1074,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local//sbin:~/.local//bin:~/.local/:$PATH
make ngircd-atheme
timeout-minutes: 30
@ -1083,7 +1115,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
plexus4
timeout-minutes: 30
@ -1130,7 +1164,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=$GITHUB_WORKSPACE/sable/target/debug/sbin:$GITHUB_WORKSPACE/sable/target/debug/bin:$GITHUB_WORKSPACE/sable/target/debug:$PATH
make sable
timeout-minutes: 30
@ -1163,7 +1199,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
solanum
timeout-minutes: 30
@ -1190,7 +1228,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
sopel
timeout-minutes: 30
@ -1228,7 +1268,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH make
thelounge
timeout-minutes: 30
@ -1261,7 +1303,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH
make unrealircd
timeout-minutes: 30
@ -1294,7 +1338,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH
make unrealircd-5
timeout-minutes: 30
@ -1333,7 +1379,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH make
unrealircd-anope
timeout-minutes: 30
@ -1366,7 +1414,9 @@ jobs:
run: |-
python -m pip install --upgrade pip
pip install pytest pytest-xdist pytest-timeout -r requirements.txt
- name: Test with pytest
- env:
IRCTEST_DEBUG_LOGS: ${{ runner.debug }}
name: Test with pytest
run: PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' PATH=$HOME/.local/bin:$PATH PATH=~/.local/unrealircd/sbin:~/.local/unrealircd/bin:~/.local/unrealircd:$PATH
make unrealircd-atheme
timeout-minutes: 30

View File

@ -11,7 +11,20 @@ import subprocess
import tempfile
import textwrap
import time
from typing import IO, Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Type
from typing import (
IO,
Any,
Callable,
Dict,
Iterator,
List,
Optional,
Sequence,
Set,
Tuple,
Type,
Union,
)
import irctest
@ -74,6 +87,7 @@ class _BaseController:
_port_lock = FileLock(Path(tempfile.gettempdir()) / "irctest_ports.json.lock")
def __init__(self, test_config: TestCaseControllerConfig):
self.debug_mode = os.getenv("IRCTEST_DEBUG_LOGS", "0").lower() in ("true", "1")
self.test_config = test_config
self.proc = None
self._own_ports: Set[Tuple[str, int]] = set()
@ -130,6 +144,12 @@ class _BaseController:
used_ports.remove((hostname, port))
self._own_ports.remove((hostname, port))
def execute(
self, command: Sequence[Union[str, Path]], **kwargs: Any
) -> subprocess.Popen:
output_to = None if self.debug_mode else subprocess.DEVNULL
return subprocess.Popen(command, stderr=output_to, stdout=output_to, **kwargs)
class DirectoryBasedController(_BaseController):
"""Helper for controllers whose software configuration is based on an

View File

@ -136,16 +136,19 @@ class AnopeController(BaseServicesController, DirectoryBasedController):
Path(services_path).parent.parent / "modules"
)
self.proc = subprocess.Popen(
extra_args = []
if self.debug_mode:
extra_args.append("--debug")
self.proc = self.execute(
[
"anope",
"--config=services.conf", # can't be an absolute path in 2.0
"--nofork", # don't fork
"--nopid", # don't write a pid
*extra_args,
],
cwd=self.directory,
# stdout=subprocess.DEVNULL,
# stderr=subprocess.DEVNULL,
)

View File

@ -1,4 +1,3 @@
import subprocess
from typing import Optional, Type
import irctest
@ -75,7 +74,7 @@ class AthemeController(BaseServicesController, DirectoryBasedController):
)
assert self.directory
self.proc = subprocess.Popen(
self.proc = self.execute(
[
"atheme-services",
"-n", # don't fork
@ -88,8 +87,6 @@ class AthemeController(BaseServicesController, DirectoryBasedController):
"-D",
self.directory,
],
# stdout=subprocess.DEVNULL,
# stderr=subprocess.DEVNULL,
)
def registerUser(

View File

@ -1,6 +1,5 @@
from pathlib import Path
import shutil
import subprocess
from typing import Optional, Set, Type
from irctest.basecontrollers import BaseServerController, DirectoryBasedController
@ -150,7 +149,7 @@ class BahamutController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"ircd",

View File

@ -1,6 +1,5 @@
from pathlib import Path
import shutil
import subprocess
from typing import Optional
from irctest.basecontrollers import BaseServerController, DirectoryBasedController
@ -74,7 +73,7 @@ class BaseHybridController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
self.binary_name,
@ -84,7 +83,6 @@ class BaseHybridController(BaseServerController, DirectoryBasedController):
"-pidfile",
self.directory / "server.pid",
],
# stderr=subprocess.DEVNULL,
)
if run_services:

View File

@ -200,7 +200,7 @@ class DlkController(BaseServicesController, DirectoryBasedController):
fd.write(TEMPLATE_DLK_WP_CONFIG.format(**template_vars))
(dlk_conf_dir / "modules.conf").symlink_to(self.dlk_path / "conf/modules.conf")
self.proc = subprocess.Popen(
self.proc = self.execute(
[
"php",
"src/dalek",

View File

@ -213,7 +213,7 @@ class ErgoController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[*faketime_cmd, "ergo", "run", "--conf", self._config_path, "--quiet"]
)

View File

@ -1,4 +1,3 @@
import subprocess
from typing import Optional, Type
from irctest import authentication, tls
@ -31,7 +30,7 @@ class GircController(BaseClientController, DirectoryBasedController):
args += ["--sasl-fail-is-ok"]
# Runs a client with the config given as arguments
self.proc = subprocess.Popen(["girc_test", "connect"] + args)
self.proc = self.execute(["girc_test", "connect"] + args)
def get_irctest_controller_class() -> Type[GircController]:

View File

@ -182,15 +182,22 @@ class InspircdController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
extra_args = []
if self.debug_mode:
if installed_version() >= 4:
extra_args.append("--protocoldebug")
else:
extra_args.append("--debug")
self.proc = self.execute(
[
*faketime_cmd,
"inspircd",
"--nofork",
"--config",
self.directory / "server.conf",
*extra_args,
],
stdout=subprocess.DEVNULL,
)
if run_services:

View File

@ -1,5 +1,4 @@
import shutil
import subprocess
from typing import Optional, Type
from irctest.basecontrollers import (
@ -78,7 +77,7 @@ class Irc2Controller(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"ircd",
@ -88,7 +87,6 @@ class Irc2Controller(BaseServerController, DirectoryBasedController):
"-f",
self.directory / "server.conf",
],
# stderr=subprocess.DEVNULL,
)

View File

@ -1,5 +1,4 @@
import shutil
import subprocess
from typing import Optional, Type
from irctest.basecontrollers import (
@ -97,7 +96,7 @@ class Ircu2Controller(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"ircd",
@ -107,7 +106,6 @@ class Ircu2Controller(BaseServerController, DirectoryBasedController):
"-x",
"DEBUG",
],
# stderr=subprocess.DEVNULL,
)

View File

@ -1,4 +1,3 @@
import subprocess
from typing import Optional, Type
from irctest import authentication, tls
@ -84,7 +83,7 @@ class LimnoriaController(BaseClientController, DirectoryBasedController):
)
)
assert self.directory
self.proc = subprocess.Popen(["supybot", self.directory / "bot.conf"])
self.proc = self.execute(["supybot", self.directory / "bot.conf"])
def get_irctest_controller_class() -> Type[LimnoriaController]:

View File

@ -1,5 +1,4 @@
import shutil
import subprocess
from typing import Optional, Set, Type
from irctest.basecontrollers import (
@ -116,7 +115,7 @@ class MammonController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"mammond",

View File

@ -1,5 +1,4 @@
import shutil
import subprocess
from typing import Optional, Set, Type
from irctest.basecontrollers import BaseServerController, DirectoryBasedController
@ -95,7 +94,7 @@ class NgircdController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"ngircd",
@ -103,7 +102,6 @@ class NgircdController(BaseServerController, DirectoryBasedController):
"--config",
self.directory / "server.conf",
],
# stdout=subprocess.DEVNULL,
)
if run_services:

View File

@ -394,7 +394,7 @@ class SableController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"sable_ircd",
@ -475,7 +475,7 @@ class SableServicesController(BaseServicesController):
with self.server_controller.open_file("configs/services.conf") as fd:
fd.write(SERVICES_CONFIG % self.server_controller.template_vars)
self.proc = subprocess.Popen(
self.proc = self.execute(
[
"sable_services",
"--foreground",

View File

@ -1,5 +1,4 @@
import shutil
import subprocess
from typing import Optional, Type
from irctest.basecontrollers import (
@ -96,7 +95,7 @@ class SnircdController(BaseServerController, DirectoryBasedController):
else:
faketime_cmd = []
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"ircd",
@ -106,7 +105,6 @@ class SnircdController(BaseServerController, DirectoryBasedController):
"-x",
"DEBUG",
],
# stderr=subprocess.DEVNULL,
)

View File

@ -1,5 +1,4 @@
from pathlib import Path
import subprocess
import tempfile
from typing import Optional, TextIO, Type, cast
@ -73,7 +72,7 @@ class SopelController(BaseClientController):
auth_method="auth_method = sasl" if auth else "",
)
)
self.proc = subprocess.Popen(["sopel", "-c", self.filename])
self.proc = self.execute(["sopel", "-c", self.filename])
def get_irctest_controller_class() -> Type[SopelController]:

View File

@ -1,6 +1,5 @@
import json
import os
import subprocess
from typing import Optional, Type
from irctest import authentication, tls
@ -96,7 +95,7 @@ class TheLoungeController(BaseClientController, DirectoryBasedController):
)
with self.open_file("users/testuser.json", "r") as fd:
print("config", json.load(fd)["networks"][0]["saslPassword"])
self.proc = subprocess.Popen(
self.proc = self.execute(
[os.environ.get("THELOUNGE_BIN", "thelounge"), "start"],
env={**os.environ, "THELOUNGE_HOME": str(self.directory)},
)

View File

@ -261,7 +261,7 @@ class UnrealircdController(BaseServerController, DirectoryBasedController):
faketime_cmd = []
with _STARTSTOP_LOCK():
self.proc = subprocess.Popen(
self.proc = self.execute(
[
*faketime_cmd,
"unrealircd",
@ -270,7 +270,6 @@ class UnrealircdController(BaseServerController, DirectoryBasedController):
"-f",
self.directory / "unrealircd.conf",
],
# stdout=subprocess.DEVNULL,
)
self.wait_for_port()

View File

@ -223,6 +223,9 @@ def get_test_job(*, config, test_config, test_id, version_flavor, jobs):
{
"name": "Test with pytest",
"timeout-minutes": 30,
"env": {
"IRCTEST_DEBUG_LOGS": "${{ runner.debug }}",
},
"run": (
f"PYTEST_ARGS='--junit-xml pytest.xml --timeout 300' "
f"PATH=$HOME/.local/bin:$PATH "