Uncrustify maxscale

See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
This commit is contained in:
Niclas Antti
2018-09-09 22:26:19 +03:00
parent fa7ec95069
commit c447e5cf15
849 changed files with 35002 additions and 27238 deletions

View File

@ -17,10 +17,10 @@ bool try_connect(TestConnections& test)
MYSQL* slave = open_conn_db(test.maxscales->readconn_slave_port[0], ip, db, user, pw, false);
bool rval = false;
if (rwsplit && master && slave &&
execute_query(rwsplit, "SELECT 1") == 0 &&
execute_query(master, "SELECT 1") == 0 &&
execute_query(slave, "SELECT 1") == 0)
if (rwsplit && master && slave
&& execute_query(rwsplit, "SELECT 1") == 0
&& execute_query(master, "SELECT 1") == 0
&& execute_query(slave, "SELECT 1") == 0)
{
rval = true;
@ -33,16 +33,18 @@ bool try_connect(TestConnections& test)
return rval;
}
int main(int argc, char *argv[])
int main(int argc, char* argv[])
{
TestConnections test(argc, argv);
test.tprintf("Connecting to RWSplit");
test.set_timeout(30);
MYSQL* conn = open_conn_no_db(test.maxscales->rwsplit_port[0], test.maxscales->IP[0],
MYSQL* conn = open_conn_no_db(test.maxscales->rwsplit_port[0],
test.maxscales->IP[0],
test.maxscales->user_name,
test.maxscales->password, test.ssl);
test.maxscales->password,
test.ssl);
test.add_result(conn == NULL, "Error connecting to MaxScale");
test.tprintf("Removing 'test_db' DB");
@ -57,8 +59,11 @@ int main(int argc, char *argv[])
test.add_result(try_connect(test), "Connection with dropped database should fail");
test.tprintf("Connecting to RWSplit again to recreate 'test_db' db");
conn = open_conn_no_db(test.maxscales->rwsplit_port[0], test.maxscales->IP[0], test.maxscales->user_name,
test.maxscales->password, test.ssl);
conn = open_conn_no_db(test.maxscales->rwsplit_port[0],
test.maxscales->IP[0],
test.maxscales->user_name,
test.maxscales->password,
test.ssl);
test.add_result(conn == NULL, "Error connecting to MaxScale");
test.tprintf("Creating and selecting 'test_db' DB");
@ -73,8 +78,11 @@ int main(int argc, char *argv[])
test.tprintf("Trying simple operations with t1 ");
conn = open_conn_no_db(test.maxscales->rwsplit_port[0], test.maxscales->IP[0], test.maxscales->user_name,
test.maxscales->password, test.ssl);
conn = open_conn_no_db(test.maxscales->rwsplit_port[0],
test.maxscales->IP[0],
test.maxscales->user_name,
test.maxscales->password,
test.ssl);
test.try_query(conn, "USE test_db");
test.try_query(conn, "INSERT INTO t1 (x1, fl) VALUES(0, 1)");
test.set_timeout(60);