1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Updates to the testrunner.tcl script so that uses a separate sub-process for each test. And so that it runs the release test procedure currently handled by wapptest.tcl.

FossilOrigin-Name: 4c3c587500ac5a3758008f0acb9432bd3bc6f0f31bacd5615f46280e55842982
This commit is contained in:
dan
2023-02-04 19:01:17 +00:00
15 changed files with 1106 additions and 605 deletions

View File

@@ -384,6 +384,27 @@ static int SQLITE_TCLAPI clock_seconds_proc(
return TCL_OK;
}
/*
** The [clock_milliseconds] command. This is more or less the same as the
** regular tcl [clock milliseconds].
*/
static int SQLITE_TCLAPI clock_milliseconds_proc(
ClientData clientData,
Tcl_Interp *interp,
int objc,
Tcl_Obj *CONST objv[]
){
Tcl_Time now;
Tcl_GetTime(&now);
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
((Tcl_WideInt)now.sec * 1000) + (now.usec / 1000)
));
UNUSED_PARAMETER(clientData);
UNUSED_PARAMETER(objc);
UNUSED_PARAMETER(objv);
return TCL_OK;
}
/*************************************************************************
** This block contains the implementation of the [sqlite3_blocking_step]
** command available to threads created by [sqlthread spawn] commands. It
@@ -617,15 +638,26 @@ static int SQLITE_TCLAPI blocking_prepare_v2_proc(
** Register commands with the TCL interpreter.
*/
int SqlitetestThread_Init(Tcl_Interp *interp){
Tcl_CreateObjCommand(interp, "sqlthread", sqlthread_proc, 0, 0);
Tcl_CreateObjCommand(interp, "clock_seconds", clock_seconds_proc, 0, 0);
struct TclCmd {
int (*xProc)(void*, Tcl_Interp*, int, Tcl_Obj*const*);
const char *zName;
int iCtx;
} aCmd[] = {
{ sqlthread_proc, "sqlthread", 0 },
{ clock_seconds_proc, "clock_second", 0 },
{ clock_milliseconds_proc, "clock_milliseconds", 0 },
#if SQLITE_OS_UNIX && defined(SQLITE_ENABLE_UNLOCK_NOTIFY)
Tcl_CreateObjCommand(interp, "sqlite3_blocking_step", blocking_step_proc,0,0);
Tcl_CreateObjCommand(interp,
"sqlite3_blocking_prepare_v2", blocking_prepare_v2_proc, (void *)1, 0);
Tcl_CreateObjCommand(interp,
"sqlite3_nonblocking_prepare_v2", blocking_prepare_v2_proc, 0, 0);
{ blocking_step_proc, "sqlite3_blocking_step", 0 },
{ blocking_prepare_v2_proc, "sqlite3_blocking_prepare_v2", 1 },
{ blocking_prepare_v2_proc, "sqlite3_nonblocking_prepare_v2", 0 },
#endif
};
int ii;
for(ii=0; ii<sizeof(aCmd)/sizeof(aCmd[0]); ii++){
void *p = SQLITE_INT_TO_PTR(aCmd[ii].iCtx);
Tcl_CreateObjCommand(interp, aCmd[ii].zName, aCmd[ii].xProc, p, 0);
}
return TCL_OK;
}
#else