Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
feat(config): Set buffer list name with CLI
Browse files Browse the repository at this point in the history
This PR implement the CLI for `buffer_list_name` and `done_list_name`
Assigning different name for different tests in CI can avoid
data racing during CI.
  • Loading branch information
howjmay committed Apr 21, 2020
1 parent 9e73866 commit 137469f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions accelerator/cli_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ typedef enum ta_cli_arg_value_e {
PROXY_API,
HEALTH_TRACK_PERIOD,
NO_GTTA,
BUFFER_LIST,
DONE_LIST,

/** LOGGER */
QUIET,
Expand Down Expand Up @@ -86,6 +88,8 @@ static struct ta_cli_argument_s {
{"health_track_period", no_argument, NULL, HEALTH_TRACK_PERIOD,
"The period for checking IRI host connection status"},
{"no-gtta", no_argument, NULL, NO_GTTA, "Disable getTransactionToConfirm (gTTA) when sending transacation"},
{"buffer_list", required_argument, NULL, BUFFER_LIST, "Set the value of `buffer_list_name`"},
{"done_list", required_argument, NULL, DONE_LIST, "Set the value of `done_list_name`"},
{"quiet", no_argument, NULL, QUIET, "Disable logger"},
{NULL, 0, NULL, 0, NULL}};

Expand Down
6 changes: 6 additions & 0 deletions accelerator/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ status_t cli_core_set(ta_core_t* const core, int key, char* const value) {
case NO_GTTA:
ta_conf->gtta = false;
break;
case BUFFER_LIST:
cache->buffer_list_name = value;
break;
case DONE_LIST:
cache->done_list_name = value;
break;

// File configuration
case CONF_CLI: {
Expand Down

0 comments on commit 137469f

Please sign in to comment.