Bug 1864143 - Disable Gecko's crash reporter in test_duplex.cpp, that runs a death-test. r=pehrsons,cubeb-reviewers,kinetik

Differential Revision: https://phabricator.services.mozilla.com/D194217
This commit is contained in:
Paul Adenot 2023-11-28 13:43:20 +00:00
Родитель 197742d8a5
Коммит cc81b284c3
3 изменённых файлов: 46 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,41 @@
diff --git a/test/test_duplex.cpp b/test/test_duplex.cpp
--- a/test/test_duplex.cpp
+++ b/test/test_duplex.cpp
@@ -13,16 +13,18 @@
#endif
#include "cubeb/cubeb.h"
#include <atomic>
#include <math.h>
#include <memory>
#include <stdio.h>
#include <stdlib.h>
+#include "mozilla/gtest/MozHelpers.h"
+
// #define ENABLE_NORMAL_LOG
// #define ENABLE_VERBOSE_LOG
#include "common.h"
#define SAMPLE_FREQUENCY 48000
#define STREAM_FORMAT CUBEB_SAMPLE_FLOAT32LE
#define INPUT_CHANNELS 1
#define INPUT_LAYOUT CUBEB_LAYOUT_MONO
@@ -201,16 +203,18 @@ TEST(cubeb, duplex_collection_change)
ASSERT_EQ(r, CUBEB_OK);
}
TEST(cubeb, duplex_collection_change_no_unregister)
{
cubeb * ctx;
int r;
+ mozilla::gtest::DisableCrashReporter();
+
r = common_init(&ctx, "Cubeb duplex example with collection change");
ASSERT_EQ(r, CUBEB_OK) << "Error initializing cubeb library";
/* This test needs an available input device, skip it if this host does not
* have one. */
if (!can_run_audio_input_test(ctx)) {
cubeb_destroy(ctx);
return;

Просмотреть файл

@ -18,6 +18,7 @@ vendoring:
vendor-directory: media/libcubeb
patches:
- 0001-disable-aaudio-before-android-31.patch
- 0002-disable-crash-reporter-death-test.patch
skip-vendoring-steps:
- update-moz-build
exclude:

Просмотреть файл

@ -18,6 +18,8 @@
#include <stdio.h>
#include <stdlib.h>
#include "mozilla/gtest/MozHelpers.h"
// #define ENABLE_NORMAL_LOG
// #define ENABLE_VERBOSE_LOG
#include "common.h"
@ -206,6 +208,8 @@ TEST(cubeb, duplex_collection_change_no_unregister)
cubeb * ctx;
int r;
mozilla::gtest::DisableCrashReporter();
r = common_init(&ctx, "Cubeb duplex example with collection change");
ASSERT_EQ(r, CUBEB_OK) << "Error initializing cubeb library";