Skip to content

Commit

Permalink
Slight adaptation for test.main.cpp
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas PARLANT <[email protected]>
  • Loading branch information
PPN-SD committed Jan 31, 2025
1 parent c3092a5 commit 9154a09
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/test/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#ifdef USE_BENCH
#include <benchmark/benchmark.h>
#endif

#include "errordialoghandler.h"
#include "mixxxtest.h"
Expand All @@ -8,6 +10,7 @@ int main(int argc, char **argv) {
// We never want to popup error dialogs when running tests.
ErrorDialogHandler::setEnabled(false);

#ifdef USE_BENCH
bool run_benchmarks = false;
for (int i = 0; i < argc; ++i) {
if (strcmp(argv[i], "--benchmark") == 0) {
Expand All @@ -33,4 +36,9 @@ int main(int argc, char **argv) {
} else {
return RUN_ALL_TESTS();
}
#else
testing::InitGoogleTest(&argc, argv);
MixxxTest::ApplicationScope applicationScope(argc, argv);
return RUN_ALL_TESTS();
#endif
}

0 comments on commit 9154a09

Please sign in to comment.