diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 14:49:22 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-06-01 16:54:58 +0200 |
commit | 7e3047881eb9095c6a5bdd0394783f163ef2142f (patch) | |
tree | 7026683a78812a1af1d253ce4f434bcf5c3d16b8 | |
parent | 349fee6bca3fbe9034a8e2b1cc65b287771e86e7 (diff) |
Now everything builds without fastos.h
16 files changed, 55 insertions, 42 deletions
diff --git a/lowercasing_test/src/tests/lowercasing/casingvariants_vespalib.cpp b/lowercasing_test/src/tests/lowercasing/casingvariants_vespalib.cpp index 1f18ecdef1b..fcbc3b701e1 100644 --- a/lowercasing_test/src/tests/lowercasing/casingvariants_vespalib.cpp +++ b/lowercasing_test/src/tests/lowercasing/casingvariants_vespalib.cpp @@ -3,6 +3,7 @@ #include <vespa/vespalib/text/utf8.h> #include <fstream> #include <iostream> +#include <cassert> using vespalib::LowerCase; using vespalib::Utf8ReaderForZTS; diff --git a/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp b/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp index 09701cb6ddf..225a977e384 100644 --- a/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp +++ b/searchcore/src/tests/proton/index/diskindexcleaner_test.cpp @@ -1,15 +1,16 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Unit tests for diskindexcleaner. -#include <vespa/log/log.h> -LOG_SETUP("diskindexcleaner_test"); - #include <vespa/searchcorespi/index/activediskindexes.h> #include <vespa/searchcorespi/index/diskindexcleaner.h> #include <vespa/vespalib/testkit/testapp.h> +#include <vespa/fastos/file.h> #include <string> #include <vector> +#include <vespa/log/log.h> +LOG_SETUP("diskindexcleaner_test"); + using std::string; using std::vector; using namespace searchcorespi::index; diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp index a67e6d859bb..fa7572d50bd 100644 --- a/searchcore/src/tests/proton/index/indexmanager_test.cpp +++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp @@ -1,9 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Unit tests for IndexManager. -#include <vespa/log/log.h> -LOG_SETUP("indexmanager_test"); - #include <vespa/document/fieldvalue/document.h> #include <vespa/document/fieldvalue/fieldvalue.h> #include <vespa/searchcore/proton/index/indexmanager.h> @@ -28,8 +25,12 @@ LOG_SETUP("indexmanager_test"); #include <vespa/vespalib/util/blockingthreadstackexecutor.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/searchlib/common/sequencedtaskexecutor.h> +#include <vespa/fastos/file.h> #include <set> +#include <vespa/log/log.h> +LOG_SETUP("indexmanager_test"); + using document::Document; using document::FieldValue; using search::SequencedTaskExecutor; diff --git a/searchlib/src/tests/btree/iteratespeed.cpp b/searchlib/src/tests/btree/iteratespeed.cpp index 18699fc7a8f..0a91b5a8a1b 100644 --- a/searchlib/src/tests/btree/iteratespeed.cpp +++ b/searchlib/src/tests/btree/iteratespeed.cpp @@ -6,8 +6,6 @@ #include <vespa/searchlib/btree/btree.h> #include <vespa/searchlib/btree/btreestore.h> #include <vespa/searchlib/util/rand48.h> -#include <vespa/fastos/app.h> - #include <vespa/searchlib/btree/btreenodeallocator.hpp> #include <vespa/searchlib/btree/btreenode.hpp> #include <vespa/searchlib/btree/btreenodestore.hpp> @@ -16,6 +14,10 @@ #include <vespa/searchlib/btree/btreebuilder.hpp> #include <vespa/searchlib/btree/btree.hpp> #include <vespa/searchlib/btree/btreestore.hpp> + +#include <vespa/fastos/app.h> +#include <vespa/fastos/timestamp.h> + #include <vespa/log/log.h> LOG_SETUP("iteratespeed"); diff --git a/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp b/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp index 72510e593dd..a7e2d5738ce 100644 --- a/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp +++ b/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/searchlib/bitcompression/compression.h> -#include <vector> #include <vespa/searchlib/util/rand48.h> #include <vespa/searchlib/index/schemautil.h> #include <vespa/searchlib/bitcompression/countcompression.h> @@ -12,6 +11,8 @@ #include <vespa/searchlib/diskindex/pagedict4file.h> #include <vespa/searchlib/diskindex/pagedict4randread.h> #include <vespa/searchlib/common/tunefileinfo.h> +#include <vespa/fastos/app.h> + #include <vespa/log/log.h> LOG_SETUP("pagedict4test"); diff --git a/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp b/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp index 9384776fdba..e30413ede90 100644 --- a/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp +++ b/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp @@ -1,9 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/log/log.h> -LOG_SETUP("fileheadertk_test"); #include <vespa/searchlib/util/fileheadertk.h> #include <vespa/vespalib/testkit/testapp.h> +#include <vespa/fastos/file.h> + +#include <vespa/log/log.h> +LOG_SETUP("fileheadertk_test"); using namespace search; diff --git a/searchlib/src/tests/postinglistbm/postinglistbm.cpp b/searchlib/src/tests/postinglistbm/postinglistbm.cpp index b590b2fd0ba..02007e1ae64 100644 --- a/searchlib/src/tests/postinglistbm/postinglistbm.cpp +++ b/searchlib/src/tests/postinglistbm/postinglistbm.cpp @@ -11,6 +11,7 @@ #include <vespa/searchlib/test/fakedata/fakewordset.h> #include <vespa/searchlib/test/fakedata/fpfactory.h> #include <vespa/searchlib/index/docidandfeatures.h> +#include <vespa/fastos/app.h> using search::ResultSet; using search::fef::TermFieldMatchData; @@ -26,8 +27,7 @@ using namespace search::fakedata; void FastS_block_usr2() {} -namespace postinglistbm -{ +namespace postinglistbm { class PostingListBM : public FastOS_Application { diff --git a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp index e8cc1a22aec..190f8dda2fe 100644 --- a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp +++ b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp @@ -2,9 +2,10 @@ // Copyright (C) 2001-2003 Fast Search & Transfer ASA // Copyright (C) 2003 Overture Services Norway AS +#include "stackdumpiteratortest.h" #include <vespa/searchlib/parsequery/simplequerystack.h> #include <vespa/searchlib/parsequery/stackdumpiterator.h> -#include "stackdumpiteratortest.h" +#include <vespa/fastos/time.h> #define NUMTESTS 5 diff --git a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h index 121653a89d1..0d1ff63dd56 100644 --- a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h +++ b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h @@ -5,6 +5,9 @@ #pragma once #include <vespa/searchlib/parsequery/stackdumpiterator.h> +#include <vespa/fastos/app.h> + +namespace search { class SimpleQueryStack; } class StackDumpIteratorTest : public FastOS_Application { @@ -13,4 +16,3 @@ class StackDumpIteratorTest : public FastOS_Application bool ShowResult(int testNo, search::SimpleQueryStackDumpIterator &actual, search::SimpleQueryStack &correct, unsigned int expected); bool RunTest(int i, bool verify); }; - diff --git a/searchlib/src/tests/url/testurl.cpp b/searchlib/src/tests/url/testurl.cpp index 2b0fad0ca94..5a168032986 100644 --- a/searchlib/src/tests/url/testurl.cpp +++ b/searchlib/src/tests/url/testurl.cpp @@ -3,7 +3,9 @@ // Copyright (C) 2003 Overture Services Norway AS #include <vespa/searchlib/util/url.h> - +#include <cstdio> +#include <cstring> +#include <cassert> // needed to resolve external symbol from httpd.h on AIX void FastS_block_usr2() {} diff --git a/searchlib/src/tests/util/bufferwriter/work.h b/searchlib/src/tests/util/bufferwriter/work.h index 49a1cb8017d..ef58d2e523a 100644 --- a/searchlib/src/tests/util/bufferwriter/work.h +++ b/searchlib/src/tests/util/bufferwriter/work.h @@ -1,5 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +#pragma once + +#include <vector> + namespace search { class BufferWriter; @@ -16,4 +20,3 @@ template <class T> void workFunctor2(const std::vector<T> &v, BufferWriter &writer); } // namespace search - diff --git a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp index 9ae86841ab9..84d59010ceb 100644 --- a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp +++ b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp @@ -1,41 +1,40 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/log/log.h> -LOG_SETUP("ioerrorhandler_test"); + #include <vespa/vespalib/testkit/testapp.h> #include <vespa/vespalib/stllike/string.h> #include <vespa/searchlib/util/statefile.h> #include <vespa/searchlib/util/ioerrorhandler.h> +#include <vespa/searchlib/test/statefile.h> +#include <vespa/searchlib/test/statestring.h> +#include <vespa/fastos/file.h> #include <atomic> #include <iostream> #include <fstream> #include <string> #include <setjmp.h> #include <dlfcn.h> -#include <vespa/searchlib/test/statefile.h> -#include <vespa/searchlib/test/statestring.h> -extern "C" -{ +#include <vespa/log/log.h> +LOG_SETUP("ioerrorhandler_test"); + +extern "C" { ssize_t read(int fd, void *buf, size_t count); ssize_t write(int fd, const void *buf, size_t count); ssize_t pread(int fd, void *buf, size_t count, off_t offset); ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset); - } using ReadFunc = ssize_t (*)(int fd, void *buf, size_t count); using WriteFunc = ssize_t (*)(int fd, const void *buf, size_t count); using PreadFunc = ssize_t (*)(int fd, void *buf, size_t count, off_t offset); -using PwriteFunc = ssize_t (*)(int fd, const void *buf, size_t count, - off_t offset); +using PwriteFunc = ssize_t (*)(int fd, const void *buf, size_t count, off_t offset); using namespace search::test::statefile; using namespace search::test::statestring; -namespace -{ +namespace { ReadFunc libc_read; WriteFunc libc_write; diff --git a/searchlib/src/tests/util/rawbuf_test.cpp b/searchlib/src/tests/util/rawbuf_test.cpp index b80c580eeaa..6423e736998 100644 --- a/searchlib/src/tests/util/rawbuf_test.cpp +++ b/searchlib/src/tests/util/rawbuf_test.cpp @@ -1,12 +1,13 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // Unit tests for rawbuf. -#include <vespa/log/log.h> -LOG_SETUP("rawbuf_test"); - #include <vespa/searchlib/util/rawbuf.h> #include <vespa/vespalib/stllike/string.h> #include <vespa/vespalib/testkit/testapp.h> +#include <vespa/fastos/file.h> + +#include <vespa/log/log.h> +LOG_SETUP("rawbuf_test"); using vespalib::string; using namespace search; diff --git a/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp b/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp index 2db11a99f70..8004b2dba53 100644 --- a/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp +++ b/searchsummary/src/tests/extractkeywords/extractkeywordstest.cpp @@ -2,10 +2,10 @@ // Copyright (C) 2001-2003 Fast Search & Transfer ASA // Copyright (C) 2003 Overture Services Norway AS +#include "extractkeywordstest.h" #include <vespa/searchsummary/docsummary/keywordextractor.h> #include <vespa/searchlib/parsequery/simplequerystack.h> -#include <vespa/searchlib/util/rawbuf.h> -#include "extractkeywordstest.h" +#include <vespa/fastos/time.h> #define NUMTESTS 5 diff --git a/searchsummary/src/tests/extractkeywords/extractkeywordstest.h b/searchsummary/src/tests/extractkeywords/extractkeywordstest.h index 2b24ce39136..f0a5c93a6cb 100644 --- a/searchsummary/src/tests/extractkeywords/extractkeywordstest.h +++ b/searchsummary/src/tests/extractkeywords/extractkeywordstest.h @@ -4,12 +4,9 @@ #pragma once +#include <vespa/fastos/app.h> -namespace search { -namespace docummary { -class KeywordExtractor; -} -} +namespace search::docsummary { class KeywordExtractor; } class ExtractKeywordsTest : public FastOS_Application { @@ -25,9 +22,8 @@ private: bool RunTest(int i, bool verify); public: - ExtractKeywordsTest(void) - : _extractor(NULL) - { - } + ExtractKeywordsTest() + : _extractor(nullptr) + {} }; diff --git a/storage/src/tests/common/storagelinktest.h b/storage/src/tests/common/storagelinktest.h index 089ba885ef7..ad7d11fd13d 100644 --- a/storage/src/tests/common/storagelinktest.h +++ b/storage/src/tests/common/storagelinktest.h @@ -4,6 +4,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <tests/common/dummystoragelink.h> +#include <vespa/fastos/thread.h> namespace storage { |