git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revalidator: Fix ukey stats cache updating.
[sliver-openvswitch.git]
/
tests
/
test-jsonrpc.c
diff --git
a/tests/test-jsonrpc.c
b/tests/test-jsonrpc.c
index
9c585aa
..
7251265
100644
(file)
--- a/
tests/test-jsonrpc.c
+++ b/
tests/test-jsonrpc.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2009, 2010, 2011, 2012
Nicira Networks
.
+ * Copyright (c) 2009, 2010, 2011, 2012
, 2013, 2014 Nicira, Inc
.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-33,20
+33,19
@@
#include "timeval.h"
#include "util.h"
#include "vlog.h"
#include "timeval.h"
#include "util.h"
#include "vlog.h"
-
-static struct command all_commands[];
+#include "ovstest.h"
static void usage(void) NO_RETURN;
static void parse_options(int argc, char *argv[]);
static void usage(void) NO_RETURN;
static void parse_options(int argc, char *argv[]);
+static struct command *get_all_commands(void);
-int
-main(int argc, char *argv[])
+static void
+
test_jsonrpc_
main(int argc, char *argv[])
{
proctitle_init(argc, argv);
set_program_name(argv[0]);
parse_options(argc, argv);
{
proctitle_init(argc, argv);
set_program_name(argv[0]);
parse_options(argc, argv);
- run_command(argc - optind, argv + optind, all_commands);
- return 0;
+ run_command(argc - optind, argv + optind, get_all_commands());
}
static void
}
static void
@@
-56,7
+55,7
@@
parse_options(int argc, char *argv[])
OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1,
DAEMON_OPTION_ENUMS
};
OPT_BOOTSTRAP_CA_CERT = UCHAR_MAX + 1,
DAEMON_OPTION_ENUMS
};
- static struct option long_options[] = {
+ static
const
struct option long_options[] = {
{"verbose", optional_argument, NULL, 'v'},
{"help", no_argument, NULL, 'h'},
DAEMON_LONG_OPTIONS,
{"verbose", optional_argument, NULL, 'v'},
{"help", no_argument, NULL, 'h'},
DAEMON_LONG_OPTIONS,
@@
-336,3
+335,11
@@
static struct command all_commands[] = {
{ "help", 0, INT_MAX, do_help },
{ NULL, 0, 0, NULL },
};
{ "help", 0, INT_MAX, do_help },
{ NULL, 0, 0, NULL },
};
+
+static struct command *
+get_all_commands(void)
+{
+ return all_commands;
+}
+
+OVSTEST_REGISTER("test-jsonrpc", test_jsonrpc_main);