mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Add SQLTester --keep-going flag to allow it to continue to the next script after an error.
FossilOrigin-Name: 4d635f781b55ed9011bdf07ee6bed2d004b1c2ebba76aa110e26d8fe3152a733
This commit is contained in:
@ -185,6 +185,8 @@ public class SQLTester {
|
||||
private int nTest = 0;
|
||||
//! True to enable column name output from execSql()
|
||||
private boolean emitColNames;
|
||||
//! True to keep going regardless of how a test fails.
|
||||
private boolean keepGoing = false;
|
||||
//! The list of available db handles.
|
||||
private final sqlite3[] aDb = new sqlite3[7];
|
||||
//! Index into aDb of the current db.
|
||||
@ -260,7 +262,8 @@ public class SQLTester {
|
||||
threw = true;
|
||||
outln("❗EXCEPTION: ",e.getClass().getSimpleName(),": ",e.getMessage());
|
||||
++nAbortedScript;
|
||||
if( e.isFatal() ) throw e;
|
||||
if( keepGoing ) outln("Continuing anyway becaure of the keep-going option.");
|
||||
else if( e.isFatal() ) throw e;
|
||||
}finally{
|
||||
outln("🏁",(threw ? "❌" : "✅")," ",nTest," test(s) in ",ts.getFilename());
|
||||
}
|
||||
@ -587,6 +590,8 @@ public class SQLTester {
|
||||
if( flag.equals("verbose") ){
|
||||
// Use --verbose up to 3 times
|
||||
t.setVerbosity(t.getVerbosity() + 1);
|
||||
}else if( flag.equals("keep-going") ){
|
||||
t.keepGoing = true;
|
||||
}else{
|
||||
throw new IllegalArgumentException("Unhandled flag: "+flag);
|
||||
}
|
||||
|
Reference in New Issue
Block a user