diff options
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp | 8 | ||||
-rw-r--r-- | searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp b/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp index ddb41ae67a6..133912548b1 100644 --- a/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp +++ b/searchcore/src/apps/vespa-dump-feed/vespa-dump-feed.cpp @@ -9,11 +9,12 @@ #include <vespa/messagebus/network/rpcnetworkparams.h> #include <vespa/vespalib/io/fileutil.h> #include <vespa/vespalib/util/signalhandler.h> -#include <vespa/vespalib/util/child_process.h> +#include <vespa/vespalib/process/process.h> #include <vespa/vespalib/util/stringfmt.h> #include <vespa/vespalib/objects/nbostream.h> #include <vespa/config/common/exceptions.h> #include <vespa/config/helper/configgetter.hpp> +#include <vespa/fastos/app.h> #include <iostream> @@ -114,7 +115,6 @@ FeedHandler::~FeedHandler() class App : public FastOS_Application { public: - virtual bool useProcessStarter() const override { return true; } virtual int Main() override; }; @@ -200,8 +200,8 @@ App::Main() std::string feedCmd(vespalib::make_string("vespa-feeder --route \"%s\" %s", route.c_str(), feedFile.c_str())); fprintf(stderr, "running feed command: %s\n", feedCmd.c_str()); - std::string feederOutput; - bool feedingOk = vespalib::ChildProcess::run(feedCmd.c_str(), feederOutput); + vespalib::string feederOutput; + bool feedingOk = vespalib::Process::run(feedCmd, feederOutput); if (!feedingOk) { fprintf(stderr, "error: feed command failed\n"); fprintf(stderr, "feed command output:\n-----\n%s\n-----\n", feederOutput.c_str()); diff --git a/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp b/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp index c6c65f45e4b..1feb46cfdb7 100644 --- a/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp +++ b/searchcore/src/tests/proton/verify_ranksetup/verify_ranksetup_test.cpp @@ -1,6 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/test_kit.h> -#include <vespa/vespalib/util/child_process.h> +#include <vespa/vespalib/process/process.h> #include <vespa/vespalib/util/stringfmt.h> #include <vespa/searchcommon/common/schema.h> #include <vespa/searchlib/fef/indexproperties.h> @@ -220,7 +220,7 @@ struct Setup { } bool verify() { generate(); - return vespalib::ChildProcess::run(fmt("%s dir:%s", prog, gen_dir.c_str()).c_str()); + return vespalib::Process::run(fmt("%s dir:%s", prog, gen_dir.c_str())); } void verify_valid(std::initializer_list<std::string> features) { for (const std::string &f: features) { @@ -288,12 +288,12 @@ struct ShadowSetup : Setup { }; TEST_F("print usage", Setup()) { - EXPECT_TRUE(!vespalib::ChildProcess::run(fmt("%s", prog).c_str())); + EXPECT_TRUE(!vespalib::Process::run(fmt("%s", prog))); } TEST_F("setup output directory", Setup()) { - ASSERT_TRUE(vespalib::ChildProcess::run(fmt("rm -rf %s", gen_dir.c_str()).c_str())); - ASSERT_TRUE(vespalib::ChildProcess::run(fmt("mkdir %s", gen_dir.c_str()).c_str())); + ASSERT_TRUE(vespalib::Process::run(fmt("rm -rf %s", gen_dir.c_str()))); + ASSERT_TRUE(vespalib::Process::run(fmt("mkdir %s", gen_dir.c_str()))); } //----------------------------------------------------------------------------- @@ -458,7 +458,7 @@ TEST_F("require that broken fragile model without dry-run passes verification", //----------------------------------------------------------------------------- TEST_F("cleanup files", Setup()) { - ASSERT_TRUE(vespalib::ChildProcess::run(fmt("rm -rf %s", gen_dir.c_str()).c_str())); + ASSERT_TRUE(vespalib::Process::run(fmt("rm -rf %s", gen_dir.c_str()))); } -TEST_MAIN_WITH_PROCESS_PROXY() { TEST_RUN_ALL(); } +TEST_MAIN() { TEST_RUN_ALL(); } |