Commit 9150948e authored by Ramon Nou's avatar Ramon Nou
Browse files

Solved some issues with cargo, add testing

parent 20f11988
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ set(SCORD_CTL_BIND_PORT
  )
message(STATUS "[${PROJECT_NAME}] server bind port: ${SCORD_CTL_BIND_PORT}")

set(CARGO_PORT
set(CARGO_BIND_PORT
  "62000"
  CACHE STRING
  "Define the port through wich we should commmunicate with Cargo"
+17 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ if(SCORD_BUILD_TESTS)
  set(SCORD_ADDRESS_STRING
    ${SCORD_TRANSPORT_PROTOCOL}://${SCORD_BIND_ADDRESS}:${SCORD_BIND_PORT})

  set(DATA_STAGER_ADDRESS_STRING
    ${SCORD_TRANSPORT_PROTOCOL}://${SCORD_BIND_ADDRESS}:${CARGO_BIND_PORT})

  add_test(start_scord_daemon
    ${CMAKE_SOURCE_DIR}/scripts/runner.sh start scord.pid
           ${CMAKE_BINARY_DIR}/src/scord/scord -f -c ${CMAKE_CURRENT_BINARY_DIR}/scord.conf
@@ -73,6 +76,20 @@ if(SCORD_BUILD_TESTS)

  set_tests_properties(stop_scord_ctl PROPERTIES FIXTURES_CLEANUP scord_ctl)


  add_test(start_cargo
    ${CMAKE_SOURCE_DIR}/scripts/runner.sh start cargo.pid
           mpirun --allow-run-as-root -n 2 ${CARGO_BIN_INSTALL_DIR}/cargo -l ${CARGO_ADDRESS_STRING}
  )
  set_tests_properties(start_cargo
    PROPERTIES FIXTURES_SETUP cargo)

  add_test(stop_cargo
    ${CMAKE_SOURCE_DIR}/scripts/runner.sh stop TERM cargo.pid)

  set_tests_properties(stop_cargo
    PROPERTIES FIXTURES_CLEANUP cargo)

endif()

add_subdirectory(c)
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ main(int argc, char* argv[]) {
            .name = TESTNAME,
            .requires_server = true,
            .requires_controller = true,
            .requires_data_stager = true,
    };

    cli_args_t cli_args;
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ main(int argc, char* argv[]) {
            .name = TESTNAME,
            .requires_server = true,
            .requires_controller = true,
            .requires_data_stager = true,
    };

    cli_args_t cli_args;
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ main(int argc, char* argv[]) {
            .name = TESTNAME,
            .requires_server = true,
            .requires_controller = true,
            .requires_data_stager = true,
    };

    cli_args_t cli_args;
Loading