blob: 3c2b9455fe8c7230e028070b6cf312ced867b754 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/util/slaveproc.h>
using namespace vespalib;
bool runPrint(const char *cmd) {
std::string out;
bool res = SlaveProc::run(cmd, out);
fprintf(stderr, "%s", out.c_str());
return res;
}
TEST("make fixture macros") {
EXPECT_FALSE(runPrint("../../apps/make_fixture_macros/vespalib_make_fixture_macros_app"));
EXPECT_TRUE(runPrint("../../apps/make_fixture_macros/vespalib_make_fixture_macros_app 9 > macros.tmp"));
EXPECT_TRUE(runPrint("diff -u ../../vespa/vespalib/testkit/generated_fixture_macros.h macros.tmp"));
}
TEST_MAIN_WITH_PROCESS_PROXY() { TEST_RUN_ALL(); }
|