1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Make sure mutexes are fully enabled for thread001.test. Take steps to

ensure that the thread tests run during regression testing. (CVS 6193)

FossilOrigin-Name: 6242f113eb40d472b78685c296fecf9f749a11cd
This commit is contained in:
drh
2009-01-19 17:40:12 +00:00
parent 3cfe07037f
commit b8613ab127
7 changed files with 44 additions and 30 deletions

View File

@@ -14,13 +14,13 @@
** test that sqlite3 database handles may be concurrently accessed by
** multiple threads. Right now this only works on unix.
**
** $Id: test_thread.c,v 1.8 2008/08/28 13:55:10 danielk1977 Exp $
** $Id: test_thread.c,v 1.9 2009/01/19 17:40:12 drh Exp $
*/
#include "sqliteInt.h"
#include <tcl.h>
#if SQLITE_THREADSAFE && defined(TCL_THREADS)
#if SQLITE_THREADSAFE
#include <errno.h>
#include <unistd.h>
@@ -96,13 +96,14 @@ static Tcl_ThreadCreateType tclScriptThread(ClientData pSqlThread){
Tcl_Obj *pRes;
Tcl_Obj *pList;
int rc;
SqlThread *p = (SqlThread *)pSqlThread;
extern int Sqlitetest_mutex_Init(Tcl_Interp*);
interp = Tcl_CreateInterp();
Tcl_CreateObjCommand(interp, "clock_seconds", clock_seconds_proc, 0, 0);
Tcl_CreateObjCommand(interp, "sqlthread", sqlthread_proc, pSqlThread, 0);
Sqlitetest1_Init(interp);
Sqlitetest_mutex_Init(interp);
rc = Tcl_Eval(interp, p->zScript);
pRes = Tcl_GetObjResult(interp);