Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Jul 1, 2024
1 parent 584dee0 commit 89963f8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 36 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/mediasoup-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ jobs:
# Address Sanitizer only works on Linux.
if: runner.os == 'Linux'

- name: invoke -r worker test-asan-thread
run: invoke -r worker test-asan-thread
- name: invoke -r worker test-asan-undefined
run: invoke -r worker test-asan-undefined
# Address Sanitizer only works on Linux.
if: runner.os == 'Linux'

- name: invoke -r worker test-asan-undefined
run: invoke -r worker test-asan-undefined
- name: invoke -r worker test-asan-thread
run: invoke -r worker test-asan-thread
# Address Sanitizer only works on Linux.
if: runner.os == 'Linux'
8 changes: 4 additions & 4 deletions doc/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ Builds and runs the `mediasoup-worker-test` binary at `worker/out/Release` (or a

Run test with Address Sanitizer with `-fsanitize=address`.

### `invoke test-asan-thread`

Run test with Address Sanitizer with `-fsanitize=thread`.

### `invoke test-asan-undefined`

Run test with Address Sanitizer with `-fsanitize=undefined`.

### `invoke test-asan-thread`

Run test with Address Sanitizer with `-fsanitize=thread`.

### `invoke tidy`

Runs [clang-tidy](http://clang.llvm.org/extra/clang-tidy) and performs C++ code checks following `worker/.clang-tidy` rules.
Expand Down
8 changes: 4 additions & 4 deletions worker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ endif
format \
test \
test-asan-address \
test-asan-thread \
test-asan-undefined \
test-asan-thread \
tidy \
fuzzer \
fuzzer-run-all \
Expand Down Expand Up @@ -101,12 +101,12 @@ test: invoke
test-asan-address: invoke
"$(PYTHON)" -m invoke test-asan-address

test-asan-thread: invoke
"$(PYTHON)" -m invoke test-asan-thread

test-asan-undefined: invoke
"$(PYTHON)" -m invoke test-asan-undefined

test-asan-thread: invoke
"$(PYTHON)" -m invoke test-asan-thread

tidy: invoke
"$(PYTHON)" -m invoke tidy

Expand Down
28 changes: 14 additions & 14 deletions worker/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,11 @@ test(
workdir: meson.project_source_root(),
)

mediasoup_worker_test_asan_thread = executable(
'mediasoup-worker-test-asan-thread',
mediasoup_worker_test_asan_undefined = executable(
'mediasoup-worker-test-asan-undefined',
build_by_default: false,
install: true,
install_tag: 'mediasoup-worker-test-asan-thread',
install_tag: 'mediasoup-worker-test-asan-undefined',
dependencies: dependencies + [
catch2_proj.get_variable('catch2_dep'),
],
Expand All @@ -438,24 +438,24 @@ mediasoup_worker_test_asan_thread = executable(
cpp_args: cpp_args + [
'-DMS_LOG_STD',
'-DMS_TEST',
'-fsanitize=thread',
'-fsanitize=undefined',
],
link_args: [
'-fsanitize=thread',
'-fsanitize=undefined',
],
)

test(
'mediasoup-worker-test-asan-thread',
mediasoup_worker_test_asan_thread,
'mediasoup-worker-test-asan-undefined',
mediasoup_worker_test_asan_undefined,
workdir: meson.project_source_root(),
)

mediasoup_worker_test_asan_undefined = executable(
'mediasoup-worker-test-asan-undefined',
mediasoup_worker_test_asan_thread = executable(
'mediasoup-worker-test-asan-thread',
build_by_default: false,
install: true,
install_tag: 'mediasoup-worker-test-asan-undefined',
install_tag: 'mediasoup-worker-test-asan-thread',
dependencies: dependencies + [
catch2_proj.get_variable('catch2_dep'),
],
Expand All @@ -467,16 +467,16 @@ mediasoup_worker_test_asan_undefined = executable(
cpp_args: cpp_args + [
'-DMS_LOG_STD',
'-DMS_TEST',
'-fsanitize=undefined',
'-fsanitize=thread',
],
link_args: [
'-fsanitize=undefined',
'-fsanitize=thread',
],
)

test(
'mediasoup-worker-test-asan-undefined',
mediasoup_worker_test_asan_undefined,
'mediasoup-worker-test-asan-thread',
mediasoup_worker_test_asan_thread,
workdir: meson.project_source_root(),
)

Expand Down
20 changes: 10 additions & 10 deletions worker/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,20 +421,20 @@ def test_asan_address(ctx):


@task(pre=[setup, flatc])
def test_asan_thread(ctx):
def test_asan_undefined(ctx):
"""
Run worker test with thread Sanitizer with -fsanitize=thread
Run worker test with undefined Sanitizer with -fsanitize=undefined
"""
with ctx.cd(f'"{WORKER_DIR}"'):
ctx.run(
f'"{MESON}" compile -C "{BUILD_DIR}" -j {NUM_CORES} mediasoup-worker-test-asan-thread',
f'"{MESON}" compile -C "{BUILD_DIR}" -j {NUM_CORES} mediasoup-worker-test-asan-undefined',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
);
with ctx.cd(f'"{WORKER_DIR}"'):
ctx.run(
f'"{MESON}" install -C "{BUILD_DIR}" --no-rebuild --tags mediasoup-worker-test-asan-thread',
f'"{MESON}" install -C "{BUILD_DIR}" --no-rebuild --tags mediasoup-worker-test-asan-undefined',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
Expand All @@ -444,28 +444,28 @@ def test_asan_thread(ctx):

with ctx.cd(f'"{WORKER_DIR}"'):
ctx.run(
f'ASAN_OPTIONS=detect_leaks=1 "{BUILD_DIR}/mediasoup-worker-test-asan-thread" --invisibles {mediasoup_test_tags}',
f'ASAN_OPTIONS=detect_leaks=1 "{BUILD_DIR}/mediasoup-worker-test-asan-undefined" --invisibles {mediasoup_test_tags}',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
);


@task(pre=[setup, flatc])
def test_asan_undefined(ctx):
def test_asan_thread(ctx):
"""
Run worker test with undefined Sanitizer with -fsanitize=undefined
Run worker test with thread Sanitizer with -fsanitize=thread
"""
with ctx.cd(f'"{WORKER_DIR}"'):
ctx.run(
f'"{MESON}" compile -C "{BUILD_DIR}" -j {NUM_CORES} mediasoup-worker-test-asan-undefined',
f'"{MESON}" compile -C "{BUILD_DIR}" -j {NUM_CORES} mediasoup-worker-test-asan-thread',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
);
with ctx.cd(f'"{WORKER_DIR}"'):
ctx.run(
f'"{MESON}" install -C "{BUILD_DIR}" --no-rebuild --tags mediasoup-worker-test-asan-undefined',
f'"{MESON}" install -C "{BUILD_DIR}" --no-rebuild --tags mediasoup-worker-test-asan-thread',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
Expand All @@ -475,7 +475,7 @@ def test_asan_undefined(ctx):

with ctx.cd(f'"{WORKER_DIR}"'):
ctx.run(
f'ASAN_OPTIONS=detect_leaks=1 "{BUILD_DIR}/mediasoup-worker-test-asan-undefined" --invisibles {mediasoup_test_tags}',
f'ASAN_OPTIONS=detect_leaks=1 "{BUILD_DIR}/mediasoup-worker-test-asan-thread" --invisibles {mediasoup_test_tags}',
echo=True,
pty=PTY_SUPPORTED,
shell=SHELL
Expand Down

0 comments on commit 89963f8

Please sign in to comment.