summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/postinglistbm
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2022-04-06 12:18:08 +0000
committerHåvard Pettersen <havardpe@oath.com>2022-04-08 13:45:13 +0000
commit9fbcf76d088740aacf535e6482f86c833cfae871 (patch)
treec62dcd0f9cdcee9876b37c60f741958c14147f80 /searchlib/src/tests/postinglistbm
parent69454cef2fe53694eb5541e5f622a4e973c081bf (diff)
remove FastOS_Application
fixup (per application): - maybe ignore SIGPIPE - wire argc/argv untangle Vespa Test Framework strip down deprecated TestApp
Diffstat (limited to 'searchlib/src/tests/postinglistbm')
-rw-r--r--searchlib/src/tests/postinglistbm/postinglistbm.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/searchlib/src/tests/postinglistbm/postinglistbm.cpp b/searchlib/src/tests/postinglistbm/postinglistbm.cpp
index d0552958611..6155ef88ef3 100644
--- a/searchlib/src/tests/postinglistbm/postinglistbm.cpp
+++ b/searchlib/src/tests/postinglistbm/postinglistbm.cpp
@@ -1,7 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "stress_runner.h"
-#include <vespa/fastos/app.h>
+#include <vespa/vespalib/util/signalhandler.h>
#include <vespa/searchlib/common/bitvector.h>
#include <vespa/searchlib/common/resultset.h>
#include <vespa/searchlib/index/docidandfeatures.h>
@@ -28,7 +28,7 @@ using namespace search::fakedata;
namespace postinglistbm {
-class PostingListBM : public FastOS_Application {
+class PostingListBM {
private:
uint32_t _numDocs;
uint32_t _commonDocFreq;
@@ -49,7 +49,7 @@ public:
public:
PostingListBM();
~PostingListBM();
- int Main() override;
+ int main(int argc, char **argv);
};
void
@@ -108,14 +108,14 @@ PostingListBM::PostingListBM()
PostingListBM::~PostingListBM() = default;
int
-PostingListBM::Main()
+PostingListBM::main(int argc, char **argv)
{
int c;
bool hasElements = false;
bool hasElementWeights = false;
- while ((c = getopt(_argc, _argv, "C:c:m:r:d:l:s:t:o:uw:T:q")) != -1) {
+ while ((c = getopt(argc, argv, "C:c:m:r:d:l:s:t:o:uw:T:q")) != -1) {
switch(c) {
case 'C':
_skipCommonPairsRate = atoi(optarg);
@@ -226,12 +226,11 @@ PostingListBM::Main()
}
-int
-main(int argc, char **argv)
-{
+int main(int argc, char **argv) {
+ vespalib::SignalHandler::PIPE.ignore();
postinglistbm::PostingListBM app;
setvbuf(stdout, nullptr, _IOLBF, 32_Ki);
app._rnd.srand48(32);
- return app.Entry(argc, argv);
+ return app.main(argc, argv);
}