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

@ -22,9 +22,9 @@ struct Test
const char* query;
bool should_work;
Test(const char* q = NULL, bool works = true):
query(q),
should_work(works)
Test(const char* q = NULL, bool works = true)
: query(q)
, should_work(works)
{
}
};
@ -38,8 +38,10 @@ void do_test(Test pre, Test post)
if (pre.query)
{
rc = execute_query_silent(test.maxscales->conn_rwsplit[0], pre.query);
test.assert((rc == 0) == pre.should_work, "Expected query '%s' to %s: %s",
pre.query, pre.should_work ? "succeed" : "fail",
test.assert((rc == 0) == pre.should_work,
"Expected query '%s' to %s: %s",
pre.query,
pre.should_work ? "succeed" : "fail",
mysql_error(test.maxscales->conn_rwsplit[0]));
}
@ -47,8 +49,10 @@ void do_test(Test pre, Test post)
sleep(5);
rc = execute_query_silent(test.maxscales->conn_rwsplit[0], post.query);
test.assert((rc == 0) == post.should_work, "Expected query '%s' to %s: %s",
post.query, post.should_work ? "succeed" : "fail",
test.assert((rc == 0) == post.should_work,
"Expected query '%s' to %s: %s",
post.query,
post.should_work ? "succeed" : "fail",
mysql_error(test.maxscales->conn_rwsplit[0]));
change_master(0, 1);