aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/testapp-debug/testapp-debug.cpp
blob: b65b9fb96bd0a20ee69dbde8f9be1340446a3fc2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/test_kit.h>

using namespace vespalib;

TEST_MAIN() {
    int status = system("./vespalib_debug_test_app");
    ASSERT_FALSE(WIFSIGNALED(status));
    EXPECT_NOT_EQUAL(0, WEXITSTATUS(status));
    status = system("diff lhs.out rhs.out > diff.out");
    ASSERT_FALSE(WIFSIGNALED(status));
    EXPECT_NOT_EQUAL(0, WEXITSTATUS(status));


    std::string diff_cmd("diff diff.out ");
    diff_cmd += TEST_PATH("diff.ref");
    EXPECT_EQUAL(system(diff_cmd.c_str()), 0);
}