This commit is contained in:
Cory McWilliams 2024-02-25 15:03:26 -05:00
parent 1ed0e817e8
commit a43c1d3d1e

View File

@ -67,16 +67,14 @@ const command_t k_commands[] = {
static int _tf_command_test(const char* file, int argc, char* argv[]) static int _tf_command_test(const char* file, int argc, char* argv[])
{ {
#if !defined(__ANDROID__) #if !defined(__ANDROID__)
tf_test_options_t test_options = tf_test_options_t test_options = {
{
.exe_path = file, .exe_path = file,
}; };
bool show_usage = false; bool show_usage = false;
while (!show_usage) while (!show_usage)
{ {
static struct option k_options[] = static const struct option k_options[] = {
{
{ "tests", required_argument, NULL, 't' }, { "tests", required_argument, NULL, 't' },
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
{ 0 }, { 0 },
@ -130,8 +128,7 @@ static int _tf_command_import(const char* file, int argc, char* argv[])
while (!show_usage) while (!show_usage)
{ {
static struct option k_options[] = static const struct option k_options[] = {
{
{ "user", required_argument, NULL, 'u' }, { "user", required_argument, NULL, 'u' },
{ "db-path", required_argument, NULL, 'd' }, { "db-path", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
@ -195,8 +192,7 @@ static int _tf_command_export(const char* file, int argc, char* argv[])
while (!show_usage) while (!show_usage)
{ {
static const struct option k_options[] = static const struct option k_options[] = {
{
{ "user", required_argument, NULL, 'u' }, { "user", required_argument, NULL, 'u' },
{ "db-path", required_argument, NULL, 'd' }, { "db-path", required_argument, NULL, 'd' },
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
@ -420,8 +416,7 @@ static int _tf_command_run(const char* file, int argc, char* argv[])
while (!show_usage) while (!show_usage)
{ {
static const struct option k_options[] = static const struct option k_options[] = {
{
{ "script", required_argument, NULL, 's' }, { "script", required_argument, NULL, 's' },
{ "ssb-port", required_argument, NULL, 'b' }, { "ssb-port", required_argument, NULL, 'b' },
{ "http-port", required_argument, NULL, 'p' }, { "http-port", required_argument, NULL, 'p' },
@ -539,8 +534,7 @@ static int _tf_command_sandbox(const char* file, int argc, char* argv[])
while (!show_usage) while (!show_usage)
{ {
static const struct option k_options[] = static const struct option k_options[] = {
{
{ "help", no_argument, NULL, 'h' }, { "help", no_argument, NULL, 'h' },
{ 0 }, { 0 },
}; };