1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Make it easy to attach a debugger the test fixture process prior to any tests being run.

FossilOrigin-Name: c23acba11bfefc019b5945cfb345f9afcf4b6242
This commit is contained in:
mistachkin
2013-08-15 08:06:15 +00:00
parent 3dfaf6766c
commit 1f28e0703f
3 changed files with 32 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
C Fix\sa\sfew\smore\sminor\scomment\stypos.\s\sNo\schanges\sto\scode. C Make\sit\seasy\sto\sattach\sa\sdebugger\sthe\stest\sfixture\sprocess\sprior\sto\sany\stests\sbeing\srun.
D 2013-08-14T00:20:23.461 D 2013-08-15T08:06:15.562
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -225,7 +225,7 @@ F src/sqliteInt.h def0e436c0d4ca5084305ca6ae898020fbafaae4
F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d F src/sqliteLimit.h 164b0e6749d31e0daa1a4589a169d31c0dec7b3d
F src/status.c 7ac05a5c7017d0b9f0b4bcd701228b784f987158 F src/status.c 7ac05a5c7017d0b9f0b4bcd701228b784f987158
F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e F src/table.c 2cd62736f845d82200acfa1287e33feb3c15d62e
F src/tclsqlite.c b8835978e853a89bf58de88acc943a5ca94d752e F src/tclsqlite.c 659dad8ef30b54831306a244b43e37af4725a444
F src/test1.c 870fc648a48cb6d6808393174f7ebe82b8c840fa F src/test1.c 870fc648a48cb6d6808393174f7ebe82b8c840fa
F src/test2.c 7355101c085304b90024f2261e056cdff13c6c35 F src/test2.c 7355101c085304b90024f2261e056cdff13c6c35
F src/test3.c 1c0e5d6f080b8e33c1ce8b3078e7013fdbcd560c F src/test3.c 1c0e5d6f080b8e33c1ce8b3078e7013fdbcd560c
@@ -1105,7 +1105,10 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
P ac336959490083ffeaaf25aaec97ecb59a2f4536 P 9e999081a59b161a0a1f968fbc01a1db9ea43b93
R b65660836257e0b7350de3a479496a6b R c32412a10fe0450296a67115895879b1
T *branch * dbgTestFixture
T *sym-dbgTestFixture *
T -sym-trunk *
U mistachkin U mistachkin
Z 2adbd114c976ac90cd58966c1c244f68 Z 7b47b87c7211179488e7ecca78b01825

View File

@@ -1 +1 @@
9e999081a59b161a0a1f968fbc01a1db9ea43b93 c23acba11bfefc019b5945cfb345f9afcf4b6242

View File

@@ -41,6 +41,18 @@
#endif #endif
#include <ctype.h> #include <ctype.h>
/* Used to get the current process ID */
#if !defined(_WIN32)
# include <unistd.h>
# define GETPID getpid
#elif !defined(_WIN32_WCE)
# ifndef SQLITE_AMALGAMATION
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
# define GETPID (int)GetCurrentProcessId
#endif
/* /*
* Windows needs to know which symbols to export. Unix does not. * Windows needs to know which symbols to export. Unix does not.
* BUILD_sqlite should be undefined for Unix. * BUILD_sqlite should be undefined for Unix.
@@ -3746,7 +3758,16 @@ static void init_all(Tcl_Interp *interp){
#define TCLSH_MAIN main /* Needed to fake out mktclapp */ #define TCLSH_MAIN main /* Needed to fake out mktclapp */
int TCLSH_MAIN(int argc, char **argv){ int TCLSH_MAIN(int argc, char **argv){
Tcl_Interp *interp; Tcl_Interp *interp;
#if !defined(_WIN32_WCE)
if( getenv("BREAK") ){
fprintf(stderr,
"attach debugger to process %d and press any key to continue.\n",
GETPID());
fgetc(stdin);
}
#endif
/* Call sqlite3_shutdown() once before doing anything else. This is to /* Call sqlite3_shutdown() once before doing anything else. This is to
** test that sqlite3_shutdown() can be safely called by a process before ** test that sqlite3_shutdown() can be safely called by a process before
** sqlite3_initialize() is. */ ** sqlite3_initialize() is. */