Skip to content

Commit

Permalink
Make ping-pong test build on master (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
senderista authored Mar 18, 2021
1 parent e8596e7 commit ff07bc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion production/tools/tests/ping_pong/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ process_schema(
translate_ruleset(
RULESET_FILE ${PING_PONG_RULESET}
OUTPUT_FOLDER ${PROJECT_BINARY_DIR}
CLANG_PARAMS -I ${GAIA_INC} -I ${SPDLOG_INC}
CLANG_PARAMS -I ${GAIA_INC} -I ${SPDLOG_INC} -I ${FLATBUFFERS_INC}
DEPENDS generate_ping_pong_headers
GAIAT_CMD ${GAIA_PROD_BUILD}/tools/gaia_translate/gaiat
)
Expand All @@ -39,6 +39,7 @@ set_target_properties(ping_pong PROPERTIES LINK_FLAGS "${GAIA_LINK_FLAGS}")
target_include_directories(ping_pong PRIVATE
${GAIA_INC}
${SPDLOG_INC}
${FLATBUFFERS_INC}
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR})
target_link_libraries(ping_pong PRIVATE pthread gaia)
8 changes: 5 additions & 3 deletions production/tools/tests/ping_pong/ping_pong.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// All rights reserved.
/////////////////////////////////////////////

#include <cstring>

#include <string>

#include "gaia/logger.hpp"
Expand All @@ -26,12 +28,12 @@ ruleset ping_pong
if (iteration_count % c_log_heartbeat_frequency)
{
// If, for whatever reason, the next condition is never met, at least we log something.
gaia_log::app().info("Rules:'{}' iteration:'{}'", ping_pong.status, iteration_count);
gaia_log::app().info("Rules:'{}' iteration:'{}'", @ping_pong.status, iteration_count);
}

if (strcmp(ping_pong.status, c_ping) == 0)
if (strcmp(@ping_pong.status, c_ping) == 0)
{
gaia_log::app().info("Rules:'{}'->'{}' iteration:'{}' txn_id:'{}'", ping_pong.status, c_pong, iteration_count, txn_id);
gaia_log::app().info("Rules:'{}'->'{}' iteration:'{}' txn_id:'{}'", @ping_pong.status, c_pong, iteration_count, txn_id);
// If I dont' use a fully qualified name, it will fail here.
status = c_pong;
}
Expand Down

0 comments on commit ff07bc2

Please sign in to comment.