diff options
Diffstat (limited to 'staging_vespalib/src/tests/assert/assert_test.cpp')
-rw-r--r-- | staging_vespalib/src/tests/assert/assert_test.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/staging_vespalib/src/tests/assert/assert_test.cpp b/staging_vespalib/src/tests/assert/assert_test.cpp deleted file mode 100644 index 454c0957974..00000000000 --- a/staging_vespalib/src/tests/assert/assert_test.cpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2018 Yahoo Holdings. 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/slaveproc.h> -#include <vespa/vespalib/util/stringfmt.h> -#include <vespa/vespalib/util/assert.h> -#include <vespa/vespalib/io/fileutil.h> -#include <sys/stat.h> -#include <unistd.h> -#include <vespa/defaults.h> - -using namespace vespalib; - -TEST("that it borks the first time.") { - std::string assertName; - const char * assertDir = "var/db/vespa/tmp"; - vespalib::rmdir("var", true); - ASSERT_TRUE(vespalib::mkdir(assertDir, true)); - { - SlaveProc proc("ulimit -c 0 && exec env VESPA_HOME=./ ./staging_vespalib_asserter_app myassert 10000"); - proc.wait(); - ASSERT_EQUAL(proc.getExitCode() & 0x7f, 6); - } - { - SlaveProc proc("ulimit -c 0 && exec env VESPA_HOME=./ ./staging_vespalib_asserter_app myassert 10000"); - proc.readLine(assertName); - proc.wait(); - ASSERT_EQUAL(proc.getExitCode() & 0x7f, 0); - } - ASSERT_EQUAL(0, unlink(assertName.c_str())); - { - SlaveProc proc("ulimit -c 0 && exec env VESPA_HOME=./ ./staging_vespalib_asserter_app myassert 10000"); - proc.wait(); - ASSERT_EQUAL(proc.getExitCode() & 0x7f, 6); - } - ASSERT_EQUAL(0, unlink(assertName.c_str())); - ASSERT_TRUE(vespalib::rmdir("var", true)); -} - -TEST_MAIN_WITH_PROCESS_PROXY() { TEST_RUN_ALL(); } |