From: drh Date: Wed, 17 Apr 2013 18:56:16 +0000 (+0000) Subject: In the mptester, add --glob and --notglob and --testcase. Make --exit work X-Git-Tag: version-3.7.17~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87f9caa85ca7249d13d814993ac6e375d16b8535;p=thirdparty%2Fsqlite.git In the mptester, add --glob and --notglob and --testcase. Make --exit work on the main thread. Enable the load_extension() SQL function. FossilOrigin-Name: c273c171f511475045ef0aa68ecf8e22b8351996 --- diff --git a/manifest b/manifest index 3e8e1903cb..8c393daed2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C In\sthe\scommand-line\sshell,\sallow\sa\sdot-command\sto\soccur\safter\sa\nmulti-line\sc-style\scomment. -D 2013-04-17T17:33:17.457 +C In\sthe\smptester,\sadd\s--glob\sand\s--notglob\sand\s--testcase.\s\sMake\s--exit\swork\non\sthe\smain\sthread.\s\sEnable\sthe\sload_extension()\sSQL\sfunction. +D 2013-04-17T18:56:16.833 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 3dd3fcb87b70c78d99b2c8a03e44ec86d6ca9ce2 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -114,7 +114,7 @@ F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 F mptest/crash01.test a5f31998ed48de8267d6620e8af107ec148e5f12 F mptest/crash02.subtest f4ef05adcd15d60e5d2bd654204f2c008b519df8 -F mptest/mptest.c 2a263e88f18762ac5d7fb56749d2d2ea8e22cb93 +F mptest/mptest.c 36c511bf0b562ccadede7cd31208dc1ec75b7ce2 F mptest/multiwrite01.test 81fbc17657964889b60750bd7bbb1deffe8f4d42 F spec.template 86a4a43b99ebb3e75e6b9a735d5fd293a24e90ca F sqlite.pc.in 42b7bf0d02e08b9e77734a47798d1a55a9e0716b @@ -1051,7 +1051,7 @@ F tool/vdbe-compress.tcl f12c884766bd14277f4fcedcae07078011717381 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac -P 76f4e31245fd1676a4520a2f7488bca6eb981e4a -R 7329574a8fd763912288e6955296b961 +P e2c94ab930f0e5a6dbe8cdd34ebb8cfeeedca56c +R d244e7c9ac86257619e9ec497e6803a5 U drh -Z d7a8232879b542fa4edbd90644b25d07 +Z 0c9d37cd97d14173f04c5765259a70d1 diff --git a/manifest.uuid b/manifest.uuid index 2d365214d6..6821f27d9a 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e2c94ab930f0e5a6dbe8cdd34ebb8cfeeedca56c \ No newline at end of file +c273c171f511475045ef0aa68ecf8e22b8351996 \ No newline at end of file diff --git a/mptest/mptest.c b/mptest/mptest.c index e47be5ae6d..8dc95be7bc 100644 --- a/mptest/mptest.c +++ b/mptest/mptest.c @@ -898,13 +898,24 @@ static void runScript( ** Exit this process. If N>0 then exit without shutting down ** SQLite. (In other words, simulate a crash.) */ - if( strcmp(zCmd, "exit")==0 && iClient>0 ){ + if( strcmp(zCmd, "exit")==0 ){ int rc = atoi(azArg[0]); finishScript(iClient, taskId, 1); if( rc==0 ) sqlite3_close(g.db); exit(rc); }else + /* + ** --testcase NAME + ** + ** Exit this process. If N>0 then exit without shutting down + ** SQLite. (In other words, simulate a crash.) + */ + if( strcmp(zCmd, "testcase")==0 ){ + if( g.iTrace==1 ) logMessage("%.*s", len - 1, zScript+ii); + stringReset(&sResult); + }else + /* ** --finish ** @@ -942,6 +953,30 @@ static void runScript( stringReset(&sResult); }else + /* + ** --glob ANSWER... + ** --notglob ANSWER.... + ** + ** Check to see if output does or does not match the glob pattern + ** ANSWER. + */ + if( strcmp(zCmd, "glob")==0 || strcmp(zCmd, "notglob")==0 ){ + int jj; + char *zAns = zScript+ii; + char *zCopy; + int isGlob = (zCmd[0]=='g'); + for(jj=9-3*isGlob; jj