diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-02-11 07:00:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-11 07:00:00 -0500 |
| commit | 757abe78d84cba04c058f43b60d07dca554302c2 (patch) | |
| tree | 49bf0f89b9eb968c89f6e6654d973fbebb7cf848 /tests/lib/cli/test_cli.c | |
| parent | bb867fc5a7847452a9d7b16143d3fb798acdc38a (diff) | |
| parent | cd2726408a423e8b977f5906cc2aaee86c3d8327 (diff) | |
Merge pull request #195 from opensourcerouting/cli_merge
CLI: independent merge step
Diffstat (limited to 'tests/lib/cli/test_cli.c')
| -rw-r--r-- | tests/lib/cli/test_cli.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/lib/cli/test_cli.c b/tests/lib/cli/test_cli.c index 1a316022e2..54b34bc799 100644 --- a/tests/lib/cli/test_cli.c +++ b/tests/lib/cli/test_cli.c @@ -38,8 +38,10 @@ DUMMY_DEFUN(cmd11, "alt a WORD"); DUMMY_DEFUN(cmd12, "alt a A.B.C.D"); DUMMY_DEFUN(cmd13, "alt a X:X::X:X"); -void test_init(void) +void test_init(int argc, char **argv) { + size_t repeat = argc > 1 ? strtoul(argv[1], NULL, 0) : 223; + install_element (ENABLE_NODE, &cmd0_cmd); install_element (ENABLE_NODE, &cmd1_cmd); install_element (ENABLE_NODE, &cmd2_cmd); @@ -53,4 +55,12 @@ void test_init(void) install_element (ENABLE_NODE, &cmd11_cmd); install_element (ENABLE_NODE, &cmd12_cmd); install_element (ENABLE_NODE, &cmd13_cmd); + for (size_t i = 0; i < repeat; i++) { + uninstall_element (ENABLE_NODE, &cmd5_cmd); + install_element (ENABLE_NODE, &cmd5_cmd); + } + for (size_t i = 0; i < repeat; i++) { + uninstall_element (ENABLE_NODE, &cmd13_cmd); + install_element (ENABLE_NODE, &cmd13_cmd); + } } |
