Skip to content

Commit 45941eb

Browse files
committed
HWA では audio はテストしない
1 parent ef049fa commit 45941eb

File tree

3 files changed

+25
-144
lines changed

3 files changed

+25
-144
lines changed

e2e-test/test_sumomo_intel_vpl.py

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ def test_sendrecv(
195195
role="sendrecv",
196196
metadata=sora_settings.metadata,
197197
http_port=next(port_allocator),
198+
audio=False,
198199
video=True,
199200
video_codec_type=video_codec_type,
200-
audio=True,
201201
initial_wait=10,
202202
**codec_params,
203203
) as client1:
@@ -208,9 +208,9 @@ def test_sendrecv(
208208
role="sendrecv",
209209
metadata=sora_settings.metadata,
210210
http_port=next(port_allocator),
211+
audio=False,
211212
video=True,
212213
video_codec_type=video_codec_type,
213-
audio=True,
214214
initial_wait=10,
215215
**codec_params,
216216
) as client2:
@@ -225,11 +225,6 @@ def test_sendrecv(
225225
assert client1_video_codec is not None
226226
assert client1_video_codec["mimeType"] == expected_mime_type
227227

228-
# audio codec を確認
229-
client1_audio_codec = get_codec(client1_stats, "audio/opus")
230-
assert client1_audio_codec is not None
231-
assert client1_audio_codec["mimeType"] == "audio/opus"
232-
233228
# video outbound-rtp を確認
234229
client1_video_outbound = get_outbound_rtp(client1_stats, "video")
235230
assert client1_video_outbound is not None
@@ -238,12 +233,6 @@ def test_sendrecv(
238233
assert "encoderImplementation" in client1_video_outbound
239234
assert client1_video_outbound["encoderImplementation"] == "libvpl"
240235

241-
# audio outbound-rtp を確認
242-
client1_audio_outbound = get_outbound_rtp(client1_stats, "audio")
243-
assert client1_audio_outbound is not None
244-
assert client1_audio_outbound["packetsSent"] > 0
245-
assert client1_audio_outbound["bytesSent"] > 0
246-
247236
# video inbound-rtp を確認
248237
client1_video_inbound = get_inbound_rtp(client1_stats, "video")
249238
assert client1_video_inbound is not None
@@ -252,12 +241,6 @@ def test_sendrecv(
252241
assert "decoderImplementation" in client1_video_inbound
253242
assert client1_video_inbound["decoderImplementation"] == "libvpl"
254243

255-
# audio inbound-rtp を確認
256-
client1_audio_inbound = get_inbound_rtp(client1_stats, "audio")
257-
assert client1_audio_inbound is not None
258-
assert client1_audio_inbound["packetsReceived"] > 0
259-
assert client1_audio_inbound["bytesReceived"] > 0
260-
261244
# クライアント 2 の統計を確認
262245
client2_stats = client2.get_stats()
263246
assert client2_stats is not None
@@ -267,11 +250,6 @@ def test_sendrecv(
267250
assert client2_video_codec is not None
268251
assert client2_video_codec["mimeType"] == expected_mime_type
269252

270-
# audio codec を確認
271-
client2_audio_codec = get_codec(client2_stats, "audio/opus")
272-
assert client2_audio_codec is not None
273-
assert client2_audio_codec["mimeType"] == "audio/opus"
274-
275253
# video outbound-rtp を確認
276254
client2_video_outbound = get_outbound_rtp(client2_stats, "video")
277255
assert client2_video_outbound is not None
@@ -280,12 +258,6 @@ def test_sendrecv(
280258
assert "encoderImplementation" in client2_video_outbound
281259
assert client2_video_outbound["encoderImplementation"] == "libvpl"
282260

283-
# audio outbound-rtp を確認
284-
client2_audio_outbound = get_outbound_rtp(client2_stats, "audio")
285-
assert client2_audio_outbound is not None
286-
assert client2_audio_outbound["packetsSent"] > 0
287-
assert client2_audio_outbound["bytesSent"] > 0
288-
289261
# video inbound-rtp を確認
290262
client2_video_inbound = get_inbound_rtp(client2_stats, "video")
291263
assert client2_video_inbound is not None
@@ -294,12 +266,6 @@ def test_sendrecv(
294266
assert "decoderImplementation" in client2_video_inbound
295267
assert client2_video_inbound["decoderImplementation"] == "libvpl"
296268

297-
# audio inbound-rtp を確認
298-
client2_audio_inbound = get_inbound_rtp(client2_stats, "audio")
299-
assert client2_audio_inbound is not None
300-
assert client2_audio_inbound["packetsReceived"] > 0
301-
assert client2_audio_inbound["bytesReceived"] > 0
302-
303269

304270
@pytest.mark.parametrize(
305271
"video_codec_type",
@@ -329,7 +295,7 @@ def test_simulcast(sora_settings, free_port, video_codec_type):
329295
role="sendonly",
330296
metadata=sora_settings.metadata,
331297
http_port=free_port,
332-
audio=True,
298+
audio=False,
333299
video=True,
334300
video_codec_type=video_codec_type,
335301
simulcast=True,
@@ -358,17 +324,6 @@ def test_simulcast(sora_settings, free_port, video_codec_type):
358324
for expected_type in expected_types:
359325
assert expected_type in stat_types
360326

361-
# audio codec を確認
362-
audio_codec_stats = [
363-
stat
364-
for stat in stats
365-
if stat.get("type") == "codec" and stat.get("mimeType") == "audio/opus"
366-
]
367-
assert len(audio_codec_stats) == 1
368-
369-
audio_codec = audio_codec_stats[0]
370-
assert audio_codec["clockRate"] == 48000
371-
372327
# video codec を確認
373328
expected_mime_type = f"video/{video_codec_type}"
374329
video_codec_stats = [
@@ -381,18 +336,6 @@ def test_simulcast(sora_settings, free_port, video_codec_type):
381336
video_codec = video_codec_stats[0]
382337
assert video_codec["clockRate"] == 90000
383338

384-
# audio の outbound-rtp を確認
385-
audio_outbound_rtp_stats = [
386-
stat
387-
for stat in stats
388-
if stat.get("type") == "outbound-rtp" and stat.get("kind") == "audio"
389-
]
390-
assert len(audio_outbound_rtp_stats) == 1
391-
392-
audio_outbound_rtp = audio_outbound_rtp_stats[0]
393-
assert audio_outbound_rtp["packetsSent"] > 0
394-
assert audio_outbound_rtp["bytesSent"] > 0
395-
396339
# simulcast では video の outbound-rtp が 3 つ存在することを確認
397340
video_outbound_rtp_by_rid = get_simulcast_outbound_rtp(stats, "video")
398341
assert len(video_outbound_rtp_by_rid) == 3

e2e-test/test_sumomo_nvidia_video_codec.py

Lines changed: 11 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88

99
import pytest
1010

11-
from helper import get_codec, get_inbound_rtp, get_outbound_rtp, get_simulcast_outbound_rtp, get_transport
11+
from helper import (
12+
get_codec,
13+
get_inbound_rtp,
14+
get_outbound_rtp,
15+
get_simulcast_outbound_rtp,
16+
get_transport,
17+
)
1218
from sumomo import Sumomo
1319

14-
1520
# NVIDIA Video Codec 環境が有効でない場合はスキップ
1621
pytestmark = pytest.mark.skipif(
1722
not os.environ.get("NVIDIA_VIDEO_CODEC"),
@@ -61,9 +66,9 @@ def test_sendonly_recvonly(
6166
role="sendonly",
6267
metadata=sora_settings.metadata,
6368
http_port=next(port_allocator),
69+
audio=False,
6470
video=True,
6571
video_codec_type=video_codec_type,
66-
audio=True,
6772
initial_wait=10,
6873
**encoder_params,
6974
) as sender:
@@ -74,8 +79,6 @@ def test_sendonly_recvonly(
7479
role="recvonly",
7580
metadata=sora_settings.metadata,
7681
http_port=next(port_allocator),
77-
video=True,
78-
audio=True,
7982
**decoder_params,
8083
) as receiver:
8184
time.sleep(3)
@@ -89,11 +92,6 @@ def test_sendonly_recvonly(
8992
assert sender_video_codec is not None
9093
assert sender_video_codec["mimeType"] == expected_mime_type
9194

92-
# audio codec を確認
93-
sender_audio_codec = get_codec(sender_stats, "audio/opus")
94-
assert sender_audio_codec is not None
95-
assert sender_audio_codec["mimeType"] == "audio/opus"
96-
9795
# video outbound-rtp を確認
9896
sender_video_outbound = get_outbound_rtp(sender_stats, "video")
9997
assert sender_video_outbound is not None
@@ -102,12 +100,6 @@ def test_sendonly_recvonly(
102100
assert "encoderImplementation" in sender_video_outbound
103101
assert sender_video_outbound["encoderImplementation"] == "NvCodec"
104102

105-
# audio outbound-rtp を確認
106-
sender_audio_outbound = get_outbound_rtp(sender_stats, "audio")
107-
assert sender_audio_outbound is not None
108-
assert sender_audio_outbound["packetsSent"] > 0
109-
assert sender_audio_outbound["bytesSent"] > 0
110-
111103
# 受信側の統計を確認
112104
receiver_stats = receiver.get_stats()
113105
assert receiver_stats is not None
@@ -117,11 +109,6 @@ def test_sendonly_recvonly(
117109
assert receiver_video_codec is not None
118110
assert receiver_video_codec["mimeType"] == expected_mime_type
119111

120-
# audio codec を確認
121-
receiver_audio_codec = get_codec(receiver_stats, "audio/opus")
122-
assert receiver_audio_codec is not None
123-
assert receiver_audio_codec["mimeType"] == "audio/opus"
124-
125112
# video inbound-rtp を確認
126113
receiver_video_inbound = get_inbound_rtp(receiver_stats, "video")
127114
assert receiver_video_inbound is not None
@@ -130,12 +117,6 @@ def test_sendonly_recvonly(
130117
assert "decoderImplementation" in receiver_video_inbound
131118
assert receiver_video_inbound["decoderImplementation"] == "NvCodec"
132119

133-
# audio inbound-rtp を確認
134-
receiver_audio_inbound = get_inbound_rtp(receiver_stats, "audio")
135-
assert receiver_audio_inbound is not None
136-
assert receiver_audio_inbound["packetsReceived"] > 0
137-
assert receiver_audio_inbound["bytesReceived"] > 0
138-
139120

140121
@pytest.mark.parametrize(
141122
"video_codec_type",
@@ -182,9 +163,9 @@ def test_sendrecv(
182163
role="sendrecv",
183164
metadata=sora_settings.metadata,
184165
http_port=next(port_allocator),
166+
audio=False,
185167
video=True,
186168
video_codec_type=video_codec_type,
187-
audio=True,
188169
initial_wait=10,
189170
**codec_params,
190171
) as client1:
@@ -195,9 +176,9 @@ def test_sendrecv(
195176
role="sendrecv",
196177
metadata=sora_settings.metadata,
197178
http_port=next(port_allocator),
179+
audio=False,
198180
video=True,
199181
video_codec_type=video_codec_type,
200-
audio=True,
201182
initial_wait=10,
202183
**codec_params,
203184
) as client2:
@@ -212,11 +193,6 @@ def test_sendrecv(
212193
assert client1_video_codec is not None
213194
assert client1_video_codec["mimeType"] == expected_mime_type
214195

215-
# audio codec を確認
216-
client1_audio_codec = get_codec(client1_stats, "audio/opus")
217-
assert client1_audio_codec is not None
218-
assert client1_audio_codec["mimeType"] == "audio/opus"
219-
220196
# video outbound-rtp を確認
221197
client1_video_outbound = get_outbound_rtp(client1_stats, "video")
222198
assert client1_video_outbound is not None
@@ -225,12 +201,6 @@ def test_sendrecv(
225201
assert "encoderImplementation" in client1_video_outbound
226202
assert client1_video_outbound["encoderImplementation"] == "NvCodec"
227203

228-
# audio outbound-rtp を確認
229-
client1_audio_outbound = get_outbound_rtp(client1_stats, "audio")
230-
assert client1_audio_outbound is not None
231-
assert client1_audio_outbound["packetsSent"] > 0
232-
assert client1_audio_outbound["bytesSent"] > 0
233-
234204
# video inbound-rtp を確認
235205
client1_video_inbound = get_inbound_rtp(client1_stats, "video")
236206
assert client1_video_inbound is not None
@@ -239,12 +209,6 @@ def test_sendrecv(
239209
assert "decoderImplementation" in client1_video_inbound
240210
assert client1_video_inbound["decoderImplementation"] == "NvCodec"
241211

242-
# audio inbound-rtp を確認
243-
client1_audio_inbound = get_inbound_rtp(client1_stats, "audio")
244-
assert client1_audio_inbound is not None
245-
assert client1_audio_inbound["packetsReceived"] > 0
246-
assert client1_audio_inbound["bytesReceived"] > 0
247-
248212
# クライアント 2 の統計を確認
249213
client2_stats = client2.get_stats()
250214
assert client2_stats is not None
@@ -254,11 +218,6 @@ def test_sendrecv(
254218
assert client2_video_codec is not None
255219
assert client2_video_codec["mimeType"] == expected_mime_type
256220

257-
# audio codec を確認
258-
client2_audio_codec = get_codec(client2_stats, "audio/opus")
259-
assert client2_audio_codec is not None
260-
assert client2_audio_codec["mimeType"] == "audio/opus"
261-
262221
# video outbound-rtp を確認
263222
client2_video_outbound = get_outbound_rtp(client2_stats, "video")
264223
assert client2_video_outbound is not None
@@ -267,12 +226,6 @@ def test_sendrecv(
267226
assert "encoderImplementation" in client2_video_outbound
268227
assert client2_video_outbound["encoderImplementation"] == "NvCodec"
269228

270-
# audio outbound-rtp を確認
271-
client2_audio_outbound = get_outbound_rtp(client2_stats, "audio")
272-
assert client2_audio_outbound is not None
273-
assert client2_audio_outbound["packetsSent"] > 0
274-
assert client2_audio_outbound["bytesSent"] > 0
275-
276229
# video inbound-rtp を確認
277230
client2_video_inbound = get_inbound_rtp(client2_stats, "video")
278231
assert client2_video_inbound is not None
@@ -313,7 +266,7 @@ def test_simulcast(sora_settings, free_port, video_codec_type):
313266
role="sendonly",
314267
metadata=sora_settings.metadata,
315268
http_port=free_port,
316-
audio=True,
269+
audio=False,
317270
video=True,
318271
video_codec_type=video_codec_type,
319272
simulcast=True,
@@ -342,17 +295,6 @@ def test_simulcast(sora_settings, free_port, video_codec_type):
342295
for expected_type in expected_types:
343296
assert expected_type in stat_types
344297

345-
# audio codec を確認
346-
audio_codec_stats = [
347-
stat
348-
for stat in stats
349-
if stat.get("type") == "codec" and stat.get("mimeType") == "audio/opus"
350-
]
351-
assert len(audio_codec_stats) == 1
352-
353-
audio_codec = audio_codec_stats[0]
354-
assert audio_codec["clockRate"] == 48000
355-
356298
# video codec を確認
357299
expected_mime_type = f"video/{video_codec_type}"
358300
video_codec_stats = [
@@ -373,10 +315,6 @@ def test_simulcast(sora_settings, free_port, video_codec_type):
373315
]
374316
assert len(audio_outbound_rtp_stats) == 1
375317

376-
audio_outbound_rtp = audio_outbound_rtp_stats[0]
377-
assert audio_outbound_rtp["packetsSent"] > 0
378-
assert audio_outbound_rtp["bytesSent"] > 0
379-
380318
# simulcast では video の outbound-rtp が 3 つ存在することを確認
381319
video_outbound_rtp_by_rid = get_simulcast_outbound_rtp(stats, "video")
382320
assert len(video_outbound_rtp_by_rid) == 3

0 commit comments

Comments
 (0)