Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove draconian regex filter that eliminates entire tests from being run #246

Merged
17 commits merged into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_pipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
username: '$oauthtoken'
password: ${{ secrets.NGC_API_KEY }}
image: ${{ inputs.test_container }}
options: --cap-add=sys_nice
options: "--cap-add=sys_nice --cap-add=sys_ptrace"
env:
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
PARALLEL_LEVEL: '10'
Expand Down
2 changes: 0 additions & 2 deletions ci/scripts/github/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ set +e
# Tests known to be failing
# Issues:
# * test_mrc_private - https://github.com/nv-morpheus/MRC/issues/33
# * nvrpc - https://github.com/nv-morpheus/MRC/issues/34
ctest --output-on-failure \
--exclude-regex "test_mrc_private|nvrpc" \
--output-junit ${REPORTS_DIR}/report_ctest.xml

CTEST_RESULTS=$?
Expand Down
7 changes: 3 additions & 4 deletions ci/scripts/github/test_codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ set +e
# Tests known to be failing
# Issues:
# * test_mrc_private - https://github.com/nv-morpheus/MRC/issues/33
# * nvrpc - https://github.com/nv-morpheus/MRC/issues/34
ctest --output-on-failure \
--exclude-regex "test_mrc_private|nvrpc" \
--output-junit ${REPORTS_DIR}/report_ctest.xml
CODE_COV_RUN=y ctest --output-on-failure \
--verbose \
--output-junit ${REPORTS_DIR}/report_ctest.xml

CTEST_RESULTS=$?
set -e
Expand Down
4 changes: 2 additions & 2 deletions cpp/mrc/src/internal/control_plane/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,8 @@ void Server::drop_stream(const stream_id_t& stream_id)
auto search = m_connections.streams().find(stream_id);
if (search == m_connections.streams().end())
{
LOG(WARNING) << "attempting to drop stream_id: " << stream_id
<< " which is not found in set of connected streams";
LOG(FATAL) << "attempting to drop stream_id: " << stream_id
<< " which is not found in set of connected streams";
}

auto writer = search->second->writer();
Expand Down
20 changes: 20 additions & 0 deletions cpp/mrc/src/tests/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,30 @@

#pragma once

#include <gtest/gtest.h>

#include <cstdlib>
#include <functional>
#include <memory>

namespace mrc {

#define SKIP_IF_IN_CI() \
{ \
if (std::getenv("CI") != nullptr) \
{ \
GTEST_SKIP() << "Test skipped in CI"; \
} \
}

#define SKIP_IF_CODE_COV() \
{ \
if (std::getenv("CODE_COV_RUN") != nullptr) \
{ \
GTEST_SKIP() << "Test skipped in CI"; \
} \
}

class Options;
} // namespace mrc
namespace mrc::internal::system {
Expand Down
2 changes: 1 addition & 1 deletion cpp/mrc/src/tests/test_expected.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ TEST_F(TestExpected, Chaining3)

EXPECT_FALSE(rc);
EXPECT_EQ(rc.error().message(), "void fail");
EXPECT_ANY_THROW(rc->value());
EXPECT_ANY_THROW(rc.value());
}

TEST_F(TestExpected, UniquePointer)
Expand Down
11 changes: 11 additions & 0 deletions cpp/mrc/src/tests/test_ucx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
* limitations under the License.
*/

#include "common.hpp"

#include "internal/ucx/all.hpp"
#include "internal/ucx/endpoint.hpp"

Expand Down Expand Up @@ -72,6 +74,9 @@ TEST_F(TestUCX, CreateWorkerAddress)

TEST_F(TestUCX, EndpointsInProcess)
{
// note this test really should use a progress engine
GTEST_SKIP();

auto worker_1 = std::make_shared<Worker>(m_context);
auto worker_2 = std::make_shared<Worker>(m_context);

Expand Down Expand Up @@ -107,6 +112,8 @@ static void rdma_get_callback(void* request, ucs_status_t status, void* user_dat

TEST_F(TestUCX, Get)
{
SKIP_IF_CODE_COV()

auto context = std::make_shared<Context>();

auto worker_get_src = std::make_shared<Worker>(context);
Expand Down Expand Up @@ -205,6 +212,8 @@ class SendRecvManager

TEST_F(TestUCX, Recv)
{
SKIP_IF_CODE_COV();

auto context = std::make_shared<Context>();

auto worker_src = std::make_shared<Worker>(context);
Expand Down Expand Up @@ -279,6 +288,8 @@ TEST_F(TestUCX, Recv)

TEST_F(TestUCX, Recv2)
{
SKIP_IF_CODE_COV();

auto context = std::make_shared<Context>();

auto worker_src = std::make_shared<Worker>(context);
Expand Down
10 changes: 10 additions & 0 deletions cpp/mrc/tests/test_mrc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,23 @@
#include <chrono>
#include <condition_variable>
#include <cstddef>
#include <cstdlib>
#include <mutex> // for mutex & unique_lock

#define TEST_CLASS(name) \
class Test##name : public ::testing::Test \
{}

namespace mrc {

inline void skip_if_in_ci()
{
if (std::getenv("CI") != nullptr)
{
GTEST_SKIP() << "Test skipped in CI";
}
}

// class that records when it's moved/copied
struct CopyMoveCounter
{
Expand Down