예제 #1
0
void getoption_nooptionsset_defaultoptionsreturned() {
  torque_driver_type * driver = torque_driver_alloc();
  test_assert_string_equal(torque_driver_get_option(driver, TORQUE_QSUB_CMD), TORQUE_DEFAULT_QSUB_CMD);
  test_assert_string_equal(torque_driver_get_option(driver, TORQUE_QSTAT_CMD), TORQUE_DEFAULT_QSTAT_CMD);
  test_assert_string_equal(torque_driver_get_option(driver, TORQUE_QDEL_CMD), TORQUE_DEFAULT_QDEL_CMD);
  test_assert_string_equal(torque_driver_get_option(driver, TORQUE_KEEP_QSUB_OUTPUT), "0");
  test_assert_string_equal(torque_driver_get_option(driver, TORQUE_NUM_CPUS_PER_NODE), "1");
  test_assert_string_equal(torque_driver_get_option(driver, TORQUE_NUM_NODES), "1");
  test_assert_string_equal(torque_driver_get_option(driver, TORQUE_CLUSTER_LABEL), NULL );

  printf("Default options OK\n");
  torque_driver_free(driver);
}
예제 #2
0
void test_option(torque_driver_type * driver, const char * option, const char * value) {
  test_assert_true(torque_driver_set_option(driver, option, value));
  test_assert_string_equal(torque_driver_get_option(driver, option), value);
}