From c6481e0289f18598985bba974e901a24e528fc2c Mon Sep 17 00:00:00 2001 From: drh <> Date: Mon, 11 Mar 2024 18:21:02 +0000 Subject: [PATCH 01/14] Run shell*.test modules with "make mdevtest". FossilOrigin-Name: 76c471061809307c1922a9460f1ea37291ff5f4dc11a71af594351e875fdc8e3 --- Makefile.in | 4 ++-- Makefile.msc | 4 ++-- manifest | 16 ++++++++-------- manifest.uuid | 2 +- test/testrunner.tcl | 11 ++++++++++- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Makefile.in b/Makefile.in index 321fb75278..e16fa94345 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1314,9 +1314,9 @@ testfixture$(TEXE): has_tclsh85 $(TESTFIXTURE_SRC) $(LTLINK) -DSQLITE_NO_SYNC=1 $(TEMP_STORE) $(TESTFIXTURE_FLAGS) \ -o $@ $(TESTFIXTURE_SRC) $(LIBTCL) $(TLIBS) -coretestprogs: $(TESTPROGS) +coretestprogs: testfixture$(BEXE) sqlite3$(BEXE) -testprogs: coretestprogs srcck1$(BEXE) fuzzcheck$(TEXE) sessionfuzz$(TEXE) +testprogs: $(TESTPROGS) srcck1$(BEXE) fuzzcheck$(TEXE) sessionfuzz$(TEXE) # A very detailed test running most or all test cases fulltest: alltest fuzztest diff --git a/Makefile.msc b/Makefile.msc index 31a9c57ebc..5257cee981 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -2496,9 +2496,9 @@ extensiontest: testfixture.exe testloadext.dll tool-zip: testfixture.exe sqlite3.exe sqldiff.exe sqlite3_analyzer.exe $(TOP)\tool\mktoolzip.tcl .\testfixture.exe $(TOP)\tool\mktoolzip.tcl -coretestprogs: $(TESTPROGS) +coretestprogs: testfixture.exe sqlite3.exe -testprogs: coretestprogs srcck1.exe fuzzcheck.exe sessionfuzz.exe +testprogs: $(TESTPROGS) srcck1.exe fuzzcheck.exe sessionfuzz.exe fulltest: alltest fuzztest diff --git a/manifest b/manifest index 49e6d916e1..d8e6bebb99 100644 --- a/manifest +++ b/manifest @@ -1,11 +1,11 @@ -C Fix\sthe\s".import"\scommand\sin\sthe\sCLI\sso\sthat\sit\sworks\scorrectly\swith\stables\nthat\scontain\scomputed\scolumns.\n[forum:/forumpost/ca014d7358|forum\spost\sca014d7358]. -D 2024-03-11T11:24:59.268 +C Run\sshell*.test\smodules\swith\s"make\smdevtest". +D 2024-03-11T18:21:02.927 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 -F Makefile.in ca8b906b1c3285fc32cff9978a5b827f99ae3d440077babf32c257a92a2ba11c +F Makefile.in 5f2389d2a3c44b56621bb5156a9cb6e2bef01f7ec14a19335b1559cf0474bdde F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6 -F Makefile.msc 7d88d6a654d86e6a1bede090f67d633d0a57c73e591d772fce8e15bfb07147f8 +F Makefile.msc e64a52619310d3067f6c38f56eedd15918a82dade70954197d6da486ad99d7f4 F README.md 6358805260a03ebead84e168bbf3740ddf3f683b477e478567186aa7afb490d3 F VERSION c84541c6a9e8426462176fbb1f9ecb5cfd7d1bb56228053ff7eeba8841673eb6 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl 8e2a5c7550b78d3283eee6103104ae2bcf56aa1df892dbd1608f27b93ebf4de8 +F test/testrunner.tcl 277bf6ed811b1f07796eedf8b5740ef521fc7fa99bd50faad9760a1fa53653b3 F test/testrunner_data.tcl 7ffd951527bbc614e723fd8d123b6834321878530696adecfdf6035100bac64e F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P cb8d9c269c01f78f09069a2361e15087d9aeac63e9f1fd63fbd96b951384e9aa -R 9bba8f8b4bc3bf41627766fe1aa44b9c +P 95a9c88b258f18ac671a4c712603931167cc8bd0b86e41481b200c08043338b5 +R 29b12e6b8f2a6bc2a8ea9a08c15b926a U drh -Z 1d2e3bf230fd6cd6fbc6ff6c84cfd8fb +Z a3f33edbc2a09bf20230f9f2220bf336 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index c57a5b98bf..d3cdb542bf 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -95a9c88b258f18ac671a4c712603931167cc8bd0b86e41481b200c08043338b5 \ No newline at end of file +76c471061809307c1922a9460f1ea37291ff5f4dc11a71af594351e875fdc8e3 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 0c704daf21..b5bd54e2b1 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -681,13 +681,22 @@ proc add_build_job {buildname target} { set dirname "[string tolower [string map {- _} $buildname]]_$target" set dirname "testrunner_bld_$dirname" + switch $target { + testfixture - + testfixture.exe { + set mktarget coretestprogs + } + default { + set mktarget $target + } + } set id [add_job \ -displaytype bld \ -displayname "Build $buildname ($target)" \ -dirname $dirname \ -build $buildname \ - -cmd "$TRG(makecmd) $target" \ + -cmd "$TRG(makecmd) $mktarget" \ -priority 3 ] From 2dbf276e93ecbeb3c067806c8c823cc4da87c2fc Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 11 Mar 2024 19:33:55 +0000 Subject: [PATCH 02/14] Update mdevtest and sdevtest to do shell builds in parallel. And only if one or more of the tcl scripts run requires it. FossilOrigin-Name: 6eae4547d4d50c798d1f05eaa1da02f4682d261dbd64e94748179923839024e6 --- ext/expert/expert1.test | 1 + manifest | 38 ++++++++++++------------ manifest.uuid | 2 +- test/avfs.test | 1 + test/recover.test | 1 + test/shell1.test | 1 + test/shell2.test | 1 + test/shell3.test | 1 + test/shell4.test | 1 + test/shell5.test | 1 + test/shell6.test | 1 + test/shell7.test | 1 + test/shell8.test | 1 + test/shell9.test | 1 + test/testrunner.tcl | 65 ++++++++++++++++++++++++++++++++--------- 15 files changed, 83 insertions(+), 34 deletions(-) diff --git a/ext/expert/expert1.test b/ext/expert/expert1.test index 453334234d..c456c30c52 100644 --- a/ext/expert/expert1.test +++ b/ext/expert/expert1.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # The focus of this file is testing the CLI shell tool. Specifically, # the ".recommend" command. diff --git a/manifest b/manifest index d8e6bebb99..ccb451459a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Run\sshell*.test\smodules\swith\s"make\smdevtest". -D 2024-03-11T18:21:02.927 +C Update\smdevtest\sand\ssdevtest\sto\sdo\sshell\sbuilds\sin\sparallel.\sAnd\sonly\sif\sone\sor\smore\sof\sthe\stcl\sscripts\srun\srequires\sit. +D 2024-03-11T19:33:55.704 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -57,7 +57,7 @@ F ext/consio/console_io.c f32b757c9ee7fdf68e7586bee306f8368759e7cd12febb2a683919 F ext/consio/console_io.h 0548b83d7c4b7270ad544a67f2bb90cebc519637fa39b1838df4744cf0d87646 F ext/expert/README.md b321c2762bb93c18ea102d5a5f7753a4b8bac646cb392b3b437f633caf2020c3 F ext/expert/expert.c d548d603a4cc9e61f446cc179c120c6713511c413f82a4a32b1e1e69d3f086a4 -F ext/expert/expert1.test 0dd5cb096d66bed593e33053a3b364f6ef52ed72064bf5cf298364636dbf3cd6 +F ext/expert/expert1.test 53a749de08939e3bc14f804e97410927d46fa772cbce0247d7e8fa6fc2523b0c F ext/expert/sqlite3expert.c c8cea5ff15fbe792cccc4992a9b40b706411c41d32611f617897fecac6ff06a4 F ext/expert/sqlite3expert.h ca81efc2679a92373a13a3e76a6138d0310e32be53d6c3bfaedabd158ea8969b F ext/expert/test_expert.c d56c194b769bdc90cf829a14c9ecbc1edca9c850b837a4d0b13be14095c32a72 @@ -911,7 +911,7 @@ F test/autoindex5.test 2ee94f033b87ca0160e08d81034c507aff8e230df2627f0304fa309b2 F test/autovacuum.test 00671369bbf96c6a49989a9425f5b78b94075d6a4b031e5e00000c2c32f365df F test/autovacuum2.test 76f7eb4fe6a6bf6d33a196a7141dba98886d2fb53a268d7feca285d5da4759d7 F test/autovacuum_ioerr2.test 8a367b224183ad801e0e24dcb7d1501f45f244b4 -F test/avfs.test 0c3a38e03cccb0fc3127838462dc05dc3f4c1480d770c084b388304c25de3652 +F test/avfs.test 76f59743dc1f5fa533840d1818b420fe1ee45e21c0fd6bbac7942ba677903128 F test/avtrans.test b7dc25459ecbd86c6fa9c606ee3068f59d81e225118617dcf2bbb6ded2ade89e F test/backcompat.test 3e64cedda754c778ef6bbe417b6e7a295e662a4d F test/backup.test 3b08fd4af69f0fa786931103a31f4542b184aba16e239e5f22b18c3c2476697f @@ -1520,7 +1520,7 @@ F test/randexpr1.tcl 40dec52119ed3a2b8b2a773bce24b63a3a746459 F test/randexpr1.test eda062a97e60f9c38ae8d806b03b0ddf23d796df F test/rbu.test 168573d353cd0fd10196b87b0caa322c144ef736 F test/rdonly.test 64e2696c322e3538df0b1ed624e21f9a23ed9ff8 -F test/recover.test fd5199f928757cb308661b5fdca1abc19398a798ff7f24b57c3071e9f8e0471e +F test/recover.test 6463509a7404e0c35431dd9b4a1c3b4a29d7a6af8a08462b31670c8a5a616d3a F test/regexp1.test 8f2a8bc1569666e29a4cee6c1a666cd224eb6d50e2470d1dc1df995170f3e0f1 F test/regexp2.test 55ed41da802b0e284ac7e2fe944be3948f93ff25abbca0361a609acfed1368b5 F test/reindex.test cd9d6021729910ece82267b4f5e1b5ac2911a7566c43b43c176a6a4732e2118d @@ -1600,15 +1600,15 @@ F test/sharedA.test 64bdd21216dda2c6a3bd3475348ccdc108160f34682c97f2f51c19fc0e21 F test/sharedB.test 1a84863d7a2204e0d42f2e1606577c5e92e4473fa37ea0f5bdf829e4bf8ee707 F test/shared_err.test 32634e404a3317eeb94abc7a099c556a346fdb8fb3858dbe222a4cbb8926a939 F test/sharedlock.test 5ede3c37439067c43b0198f580fd374ebf15d304 -F test/shell1.test c7127a5e780ffc9e14c476773127fdf292c6db226529c44c1676f37b3793123f -F test/shell2.test 35226c070a8c7f64fd016dfac2a0db2a40f709b3131f61daacd9dad61536c9cb -F test/shell3.test 91febeac0412812bf6370abb8ed72700e32bf8f9878849414518f662dfd55e8a -F test/shell4.test 947029e5a9efae9054d424b309fc0311439c0c3a0866ebfa3b8a771120708220 -F test/shell5.test 263bfd6a49049295277e3f5bdc221390dc5e72f39954b23d43204ed81993304f -F test/shell6.test 1ceb51b2678c472ba6cf1e5da96679ce8347889fe2c3bf93a0e0fa73f00b00d3 -F test/shell7.test 115132f66d0463417f408562cc2cf534f6bbc6d83a6d50f0072a9eb171bae97f -F test/shell8.test 3fd093d481aaa94dc77fb73f1044c1f19c7efe3477a395cc4f7450133bc54915 -F test/shell9.test f457a96c088344908e0518dbabffd02eda8ac2a8733f278679e5f47c103efbab +F test/shell1.test 17a5ca9c6f24f807b2f505b4b38fcbce143d96cd8664c06c34bbbe0672bf7c30 +F test/shell2.test 56da24128304c9ab67da2964cc80beff7b35761c446ec6e6e98bff2775b15026 +F test/shell3.test 5ad4b2813717956414f2c0c8a2027895cd98ccf7dd54dbacbde4d4f5591ce5a1 +F test/shell4.test 522fdc628c55eff697b061504fb0a9e4e6dfc5d9087a633ab0f3dd11bcc4f807 +F test/shell5.test 5b2ab1c0540217773f939927c24163a56257446da3f564d4724042620bfea762 +F test/shell6.test e3b883b61d4916b6906678a35f9d19054861123ad91b856461e0a456273bdbb8 +F test/shell7.test 753c6ece5361df50025a50cadf378ea36db9cc05fb23d7a96cff7fa130626ef9 +F test/shell8.test 9b71d56a6f6fc62edd9163534ac21eaa328ad95f1b9026e7bd08d5b4621eacf6 +F test/shell9.test 8742a5b390cdcef6369f5aa223e415aa4255a4129ef249b177887dc635a87209 F test/shmlock.test 3dbf017d34ab0c60abe6a44e447d3552154bd0c87b41eaf5ceacd408dd13fda5 F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3 F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl 277bf6ed811b1f07796eedf8b5740ef521fc7fa99bd50faad9760a1fa53653b3 +F test/testrunner.tcl 742a86037556cc6a9e51b5598955fcfc7a610a187ca257791c320b13ce2d5232 F test/testrunner_data.tcl 7ffd951527bbc614e723fd8d123b6834321878530696adecfdf6035100bac64e F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 95a9c88b258f18ac671a4c712603931167cc8bd0b86e41481b200c08043338b5 -R 29b12e6b8f2a6bc2a8ea9a08c15b926a -U drh -Z a3f33edbc2a09bf20230f9f2220bf336 +P 76c471061809307c1922a9460f1ea37291ff5f4dc11a71af594351e875fdc8e3 +R 3a2de83b3312aef9322c95d69c88f610 +U dan +Z ad568019dcaf7d3ff511c52e874411fe # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index d3cdb542bf..b517c05b4d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -76c471061809307c1922a9460f1ea37291ff5f4dc11a71af594351e875fdc8e3 \ No newline at end of file +6eae4547d4d50c798d1f05eaa1da02f4682d261dbd64e94748179923839024e6 \ No newline at end of file diff --git a/test/avfs.test b/test/avfs.test index 2ebd608baa..ffd6b309fc 100644 --- a/test/avfs.test +++ b/test/avfs.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # This file implements tests for the appendvfs extension. # diff --git a/test/recover.test b/test/recover.test index 8d9ad013c0..5495b7a006 100644 --- a/test/recover.test +++ b/test/recover.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # Test the shell tool ".ar" command. # diff --git a/test/shell1.test b/test/shell1.test index 5d4243f47a..206fb0a4fd 100644 --- a/test/shell1.test +++ b/test/shell1.test @@ -11,6 +11,7 @@ # # The focus of this file is testing the CLI shell tool. # +# TESTRUNNER: shell # # Test plan: diff --git a/test/shell2.test b/test/shell2.test index 16ed33c442..c6c27d2165 100644 --- a/test/shell2.test +++ b/test/shell2.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # The focus of this file is testing the CLI shell tool. # diff --git a/test/shell3.test b/test/shell3.test index f8d69946e7..c1ea9f6a75 100644 --- a/test/shell3.test +++ b/test/shell3.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # The focus of this file is testing the CLI shell tool. # diff --git a/test/shell4.test b/test/shell4.test index eee59b02b8..4b7e9b8eec 100644 --- a/test/shell4.test +++ b/test/shell4.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # The focus of this file is testing the CLI shell tool. # These tests are specific to the .stats command. diff --git a/test/shell5.test b/test/shell5.test index 20f2ba219d..877676d726 100644 --- a/test/shell5.test +++ b/test/shell5.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # The focus of this file is testing the CLI shell tool. # These tests are specific to the .import command. diff --git a/test/shell6.test b/test/shell6.test index 49b4cc3344..4841d6c01a 100644 --- a/test/shell6.test +++ b/test/shell6.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # Test the shell tool ".lint fkey-indexes" command. # diff --git a/test/shell7.test b/test/shell7.test index 898018d775..dfd9e47c2d 100644 --- a/test/shell7.test +++ b/test/shell7.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # Test the readfile() function built into the shell tool. Specifically, # that it does not truncate the blob read at the first embedded 0x00 diff --git a/test/shell8.test b/test/shell8.test index bee6039232..944173a2a1 100644 --- a/test/shell8.test +++ b/test/shell8.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # Test the shell tool ".ar" command. # diff --git a/test/shell9.test b/test/shell9.test index 34c9d8c5d6..869cb075da 100644 --- a/test/shell9.test +++ b/test/shell9.test @@ -8,6 +8,7 @@ # May you share freely, never taking more than you give. # #*********************************************************************** +# TESTRUNNER: shell # # The focus of this file is testing the CLI shell tool. Specifically, # testing that it is possible to run a ".dump" script that creates diff --git a/test/testrunner.tcl b/test/testrunner.tcl index b5bd54e2b1..dd909ea186 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -159,6 +159,7 @@ switch -nocase -glob -- $tcl_platform(os) { set TRG(make) make.sh set TRG(makecmd) "bash make.sh" set TRG(testfixture) testfixture + set TRG(shell) sqlite3 set TRG(run) run.sh set TRG(runcmd) "bash run.sh" } @@ -167,6 +168,7 @@ switch -nocase -glob -- $tcl_platform(os) { set TRG(make) make.sh set TRG(makecmd) "bash make.sh" set TRG(testfixture) testfixture + set TRG(shell) sqlite3 set TRG(run) run.sh set TRG(runcmd) "bash run.sh" } @@ -175,6 +177,7 @@ switch -nocase -glob -- $tcl_platform(os) { set TRG(make) make.bat set TRG(makecmd) make.bat set TRG(testfixture) testfixture.exe + set TRG(shell) sqlite3.exe set TRG(run) run.bat set TRG(runcmd) "run.bat" } @@ -617,7 +620,16 @@ proc add_job {args} { trdb last_insert_rowid } -proc add_tcl_jobs {build config patternlist} { +# Argument $build is either an empty string, or else a list of length 3 +# describing the job to build testfixture. In the usual form: +# +# {ID DIRNAME DISPLAYNAME} +# +# e.g +# +# {1 /home/user/sqlite/test/testrunner_bld_xyz All-Debug} +# +proc add_tcl_jobs {build config patternlist {shelldepid ""}} { global TRG set topdir [file dirname $::testdir] @@ -666,29 +678,28 @@ proc add_tcl_jobs {build config patternlist} { if {[lsearch $lProp slow]>=0} { set priority 2 } if {[lsearch $lProp superslow]>=0} { set priority 4 } + set depid [lindex $build 0] + if {$shelldepid!="" && [lsearch $lProp shell]>=0} { set depid $shelldepid } + add_job \ -displaytype tcl \ -displayname $displayname \ -cmd $cmd \ - -depid [lindex $build 0] \ + -depid $depid \ -priority $priority - } } -proc add_build_job {buildname target} { +proc add_build_job {buildname target {postcmd ""} {depid ""}} { global TRG set dirname "[string tolower [string map {- _} $buildname]]_$target" set dirname "testrunner_bld_$dirname" - switch $target { - testfixture - - testfixture.exe { - set mktarget coretestprogs - } - default { - set mktarget $target - } + + set cmd "$TRG(makecmd) $target" + if {$postcmd!=""} { + append cmd "\n" + append cmd $postcmd } set id [add_job \ @@ -696,13 +707,30 @@ proc add_build_job {buildname target} { -displayname "Build $buildname ($target)" \ -dirname $dirname \ -build $buildname \ - -cmd "$TRG(makecmd) $mktarget" \ + -cmd $cmd \ + -depid $depid \ -priority 3 ] list $id [file normalize $dirname] $buildname } +proc add_shell_build_job {buildname dirname depid} { + global TRG + + if {$TRG(platform)=="win"} { + set path [string map {/ \\} "$dirname/" + set copycmd "xcopy /S $TRG(shell) $path" + } else { + set copycmd "cp $TRG(shell) $dirname/" + } + + return [ + add_build_job $buildname $TRG(shell) $copycmd $depid + ] +} + + proc add_make_job {bld target} { global TRG @@ -776,10 +804,19 @@ proc add_devtest_jobs {lBld patternlist} { foreach b $lBld { set bld [add_build_job $b $TRG(testfixture)] - add_tcl_jobs $bld veryquick $patternlist + add_tcl_jobs $bld veryquick $patternlist SHELL if {$patternlist==""} { add_fuzztest_jobs $b } + + if {[trdb one "SELECT EXISTS (SELECT 1 FROM jobs WHERE depid='SHELL')"]} { + set sbld [add_shell_build_job $b [lindex $bld 1] [lindex $bld 0]] + set sbldid [lindex $sbld 0] + trdb eval { + UPDATE jobs SET depid=$sbldid WHERE depid='SHELL' + } + } + } } From f4783d4d7fab71d05b76a0e88448f7042a50086c Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 11 Mar 2024 19:43:43 +0000 Subject: [PATCH 03/14] Fix a missing brace problem in testrunner.tcl introduced by the previous commit. FossilOrigin-Name: 1f5e334d98d98cd90a2fb53502015a883d96fed05c04c1c3e1e78c302bede50f --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index ccb451459a..ac3fa0c2bd 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Update\smdevtest\sand\ssdevtest\sto\sdo\sshell\sbuilds\sin\sparallel.\sAnd\sonly\sif\sone\sor\smore\sof\sthe\stcl\sscripts\srun\srequires\sit. -D 2024-03-11T19:33:55.704 +C Fix\sa\smissing\sbrace\sproblem\sin\stestrunner.tcl\sintroduced\sby\sthe\sprevious\scommit. +D 2024-03-11T19:43:43.289 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl 742a86037556cc6a9e51b5598955fcfc7a610a187ca257791c320b13ce2d5232 +F test/testrunner.tcl dc2e0d1256292f098f247a0ac33f1ad1be70e3d474bdd064c99b06637b116d3f F test/testrunner_data.tcl 7ffd951527bbc614e723fd8d123b6834321878530696adecfdf6035100bac64e F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 76c471061809307c1922a9460f1ea37291ff5f4dc11a71af594351e875fdc8e3 -R 3a2de83b3312aef9322c95d69c88f610 +P 6eae4547d4d50c798d1f05eaa1da02f4682d261dbd64e94748179923839024e6 +R ffb80cc7c28af1ee50c0fc7e45c14ced U dan -Z ad568019dcaf7d3ff511c52e874411fe +Z da9cdae477120048435de0332185ec30 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index b517c05b4d..01d0a91a04 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -6eae4547d4d50c798d1f05eaa1da02f4682d261dbd64e94748179923839024e6 \ No newline at end of file +1f5e334d98d98cd90a2fb53502015a883d96fed05c04c1c3e1e78c302bede50f \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index dd909ea186..170e0457cc 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -719,7 +719,7 @@ proc add_shell_build_job {buildname dirname depid} { global TRG if {$TRG(platform)=="win"} { - set path [string map {/ \\} "$dirname/" + set path [string map {/ \\} "$dirname/"] set copycmd "xcopy /S $TRG(shell) $path" } else { set copycmd "cp $TRG(shell) $dirname/" From 38152d9d04c4db92e871ef24bed43be2232c134b Mon Sep 17 00:00:00 2001 From: dan Date: Mon, 11 Mar 2024 20:34:02 +0000 Subject: [PATCH 04/14] Fix another testrunner.tcl problem on windows. FossilOrigin-Name: 7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index ac3fa0c2bd..5731f2374e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sa\smissing\sbrace\sproblem\sin\stestrunner.tcl\sintroduced\sby\sthe\sprevious\scommit. -D 2024-03-11T19:43:43.289 +C Fix\sanother\stestrunner.tcl\sproblem\son\swindows. +D 2024-03-11T20:34:02.340 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl dc2e0d1256292f098f247a0ac33f1ad1be70e3d474bdd064c99b06637b116d3f +F test/testrunner.tcl 283be0c85bd132136ed564a99227b946194c31a0658df43c22a5e86956b70b43 F test/testrunner_data.tcl 7ffd951527bbc614e723fd8d123b6834321878530696adecfdf6035100bac64e F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 6eae4547d4d50c798d1f05eaa1da02f4682d261dbd64e94748179923839024e6 -R ffb80cc7c28af1ee50c0fc7e45c14ced +P 1f5e334d98d98cd90a2fb53502015a883d96fed05c04c1c3e1e78c302bede50f +R 3329f7728eccdd894e074db61e3ec3e5 U dan -Z da9cdae477120048435de0332185ec30 +Z 4fb36ca27e18f07178be9aab3a444f9c # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 01d0a91a04..cf0788db21 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1f5e334d98d98cd90a2fb53502015a883d96fed05c04c1c3e1e78c302bede50f \ No newline at end of file +7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 170e0457cc..daf7457170 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -175,7 +175,7 @@ switch -nocase -glob -- $tcl_platform(os) { *win* { set TRG(platform) win set TRG(make) make.bat - set TRG(makecmd) make.bat + set TRG(makecmd) "call make.bat" set TRG(testfixture) testfixture.exe set TRG(shell) sqlite3.exe set TRG(run) run.bat @@ -720,7 +720,7 @@ proc add_shell_build_job {buildname dirname depid} { if {$TRG(platform)=="win"} { set path [string map {/ \\} "$dirname/"] - set copycmd "xcopy /S $TRG(shell) $path" + set copycmd "xcopy $TRG(shell) $path" } else { set copycmd "cp $TRG(shell) $dirname/" } From 3ac5c0818073382eaaec5acca38925dcd8e4d52f Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 12 Mar 2024 18:04:40 +0000 Subject: [PATCH 05/14] Have testrunner.tcl have each test store its temp files in its working directory. To avoid unlikely, but possible, collisions. FossilOrigin-Name: 775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58 --- manifest | 15 +++++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 7 ++++++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index 5731f2374e..e4db435c3e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sanother\stestrunner.tcl\sproblem\son\swindows. -D 2024-03-11T20:34:02.340 +C Have\stestrunner.tcl\shave\seach\stest\sstore\sits\stemp\sfiles\sin\sits\sworking\sdirectory.\sTo\savoid\sunlikely,\sbut\spossible,\scollisions. +D 2024-03-12T18:04:40.495 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl 283be0c85bd132136ed564a99227b946194c31a0658df43c22a5e86956b70b43 +F test/testrunner.tcl 9fb1341f4a3fcc169b0cffa2f319abde197a738d98131d178a81509a0638f2df F test/testrunner_data.tcl 7ffd951527bbc614e723fd8d123b6834321878530696adecfdf6035100bac64e F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,11 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 1f5e334d98d98cd90a2fb53502015a883d96fed05c04c1c3e1e78c302bede50f -R 3329f7728eccdd894e074db61e3ec3e5 +P 7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432 +R 9fe0d14be342ac1becb45016c9700f68 +T *branch * testrunner-tmpdir-fix +T *sym-testrunner-tmpdir-fix * +T -sym-trunk * U dan -Z 4fb36ca27e18f07178be9aab3a444f9c +Z 7a40c29cf47919cba49700f99392c55a # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index cf0788db21..1af80e0611 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432 \ No newline at end of file +775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index daf7457170..7dbfc251de 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -994,6 +994,11 @@ proc launch_another_job {iJob} { close $fd } + set job_cmd $job(cmd) + if {$TRG(platform)!="win"} { + set job_cmd "export SQLITE_TMPDIR=\"[file normalize $dir]\"\n$job_cmd" + } + if { $TRG(dryrun) } { mark_job_as_finished $job(jobid) "" done 0 @@ -1008,7 +1013,7 @@ proc launch_another_job {iJob} { set pwd [pwd] cd $dir set fd [open $TRG(run) w] - puts $fd $job(cmd) + puts $fd $job_cmd close $fd set fd [open "|$TRG(runcmd) 2>@1" r] cd $pwd From eea6bdce8453c07567f24b96e6ea3e1ea994940d Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 13 Mar 2024 00:37:37 +0000 Subject: [PATCH 06/14] On testrunner.tcl: (1) Add the "help" command. (2) Add the "script" command to the help message. (3) Improve the error message generated by "script" when an incorrect CONFIG option is provided. FossilOrigin-Name: 1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1 --- manifest | 17 ++++++++--------- manifest.uuid | 2 +- test/testrunner.tcl | 14 ++++++++++++++ test/testrunner_data.tcl | 8 ++++++-- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/manifest b/manifest index 5da9367f47..ed93666844 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Have\stestrunner.tcl\shave\seach\stest\sstore\sits\stemp\sfiles\sin\sits\sworking\sdirectory.\sTo\savoid\sunlikely,\sbut\spossible,\scollisions. -D 2024-03-12T18:33:57.893 +C On\stestrunner.tcl:\s(1)\sAdd\sthe\s"help"\scommand.\s\s(2)\sAdd\sthe\s"script"\scommand\nto\sthe\shelp\smessage.\s\s(3)\sImprove\sthe\serror\smessage\sgenerated\sby\s"script"\swhen\nan\sincorrect\sCONFIG\soption\sis\sprovided. +D 2024-03-13T00:37:37.096 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,8 +1687,8 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl 9fb1341f4a3fcc169b0cffa2f319abde197a738d98131d178a81509a0638f2df -F test/testrunner_data.tcl 7ffd951527bbc614e723fd8d123b6834321878530696adecfdf6035100bac64e +F test/testrunner.tcl 7cd31694a52affd636284b3e74ec10213c60e247ec71f56e9061cf669f897105 +F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 F test/thread003.test ee4c9efc3b86a6a2767516a37bd64251272560a7 @@ -2177,9 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 7805844bc4433ae088dae6d54eb972e082c5a3df06e844cfc8b69e7d97aeb432 775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58 -R 9fe0d14be342ac1becb45016c9700f68 -T +closed 775a10d10b9bf2227071e778718ba4054d4b2b4238751eb147338d687b4e0d58 -U dan -Z d2698b4f4cd69108bc3174c8dffaf5d3 +P 18842d0d72048561312c2c83035c01253150e1fe1ff37160f266d24d41a01df3 +R a8f09c1fdaad1d594fe806932cdf9a66 +U drh +Z 2fb114f4336505cce7dafa69e9c32517 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 2770d1d0c4..dffe028c56 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -18842d0d72048561312c2c83035c01253150e1fe1ff37160f266d24d41a01df3 \ No newline at end of file +1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 7dbfc251de..163ddc01e0 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -54,7 +54,9 @@ proc usage {} { Usage: $a0 ?SWITCHES? ?PERMUTATION? ?PATTERNS? $a0 PERMUTATION FILE + $a0 help $a0 njob ?NJOB? + $a0 script ?-msvc? CONFIG $a0 status where SWITCHES are: @@ -89,6 +91,10 @@ directory as a running testrunner.tcl script that is running tests. The "status" command prints a report describing the current state and progress of the tests. The "njob" command may be used to query or modify the number of sub-processes the test script uses to run tests. + +The "script" command outputs the script used to build a configuration. +Add the "-msvc" option for a Windows-compatible script. For a list of +available configurations enter "$a0 script help". }]] exit 1 @@ -329,6 +335,14 @@ if {([llength $argv]==2 || [llength $argv]==1) } #-------------------------------------------------------------------------- +#-------------------------------------------------------------------------- +# Check if this is the "help" command: +# +if {[string compare -nocase help [lindex $argv 0]]==0} { + usage +} +#-------------------------------------------------------------------------- + #-------------------------------------------------------------------------- # Check if this is the "script" command: # diff --git a/test/testrunner_data.tcl b/test/testrunner_data.tcl index 984c6d8272..f38abad589 100644 --- a/test/testrunner_data.tcl +++ b/test/testrunner_data.tcl @@ -598,7 +598,12 @@ proc trd_buildscript {config srcdir bMsvc} { # Ensure that the named configuration exists. if {![info exists build($config)]} { - error "No such build config: $config" + if {$config!="help"} { + puts "No such build config: $config" + } + puts "Available configurations: [lsort [array names build]]" + flush stdout + exit 1 } # Generate and return the script. @@ -637,4 +642,3 @@ proc trd_test_script_properties {path} { set trd_test_script_properties_cache($path) } - From 3de08a6ee0eb5eeb3d5b0008946ea606dcd8eee3 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 13 Mar 2024 10:47:54 +0000 Subject: [PATCH 07/14] Have testrunner.tcl set SQLITE_TMPDIR on windows as well. FossilOrigin-Name: 64f4dad1f928716b8688c650d043f18afcc72ec78d990145c580e2b98905b919 --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/testrunner.tcl | 14 ++++++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/manifest b/manifest index ed93666844..2735ee46af 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C On\stestrunner.tcl:\s(1)\sAdd\sthe\s"help"\scommand.\s\s(2)\sAdd\sthe\s"script"\scommand\nto\sthe\shelp\smessage.\s\s(3)\sImprove\sthe\serror\smessage\sgenerated\sby\s"script"\swhen\nan\sincorrect\sCONFIG\soption\sis\sprovided. -D 2024-03-13T00:37:37.096 +C Have\stestrunner.tcl\sset\sSQLITE_TMPDIR\son\swindows\sas\swell. +D 2024-03-13T10:47:54.860 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl 7cd31694a52affd636284b3e74ec10213c60e247ec71f56e9061cf669f897105 +F test/testrunner.tcl 29b60469f0bd1aa717507e2ec7660128894914def0f058bb6752c9bdfe61bbaa F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 18842d0d72048561312c2c83035c01253150e1fe1ff37160f266d24d41a01df3 -R a8f09c1fdaad1d594fe806932cdf9a66 -U drh -Z 2fb114f4336505cce7dafa69e9c32517 +P 1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1 +R 3f6a714f6a93dd220bd97ec3c31ac4b4 +U dan +Z 4ab7e95a7dcf535e4920c95d1b703486 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index dffe028c56..ee62c57213 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1 \ No newline at end of file +64f4dad1f928716b8688c650d043f18afcc72ec78d990145c580e2b98905b919 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 163ddc01e0..f05b399e3a 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -1008,9 +1008,14 @@ proc launch_another_job {iJob} { close $fd } - set job_cmd $job(cmd) - if {$TRG(platform)!="win"} { - set job_cmd "export SQLITE_TMPDIR=\"[file normalize $dir]\"\n$job_cmd" + # Add a batch/shell file command to set the directory used for temp + # files to the test's working directory. Otherwise, tests that use + # large numbers of temp files (e.g. zipvfs), might generate temp + # filename collisions. + if {$TRG(platform)=="win"} { + set set_tmp_dir "SET SQLITE_TMPDIR=[file normalize $dir]" + } else { + set set_tmp_dir "export SQLITE_TMPDIR=\"[file normalize $dir]\"" } if { $TRG(dryrun) } { @@ -1027,7 +1032,8 @@ proc launch_another_job {iJob} { set pwd [pwd] cd $dir set fd [open $TRG(run) w] - puts $fd $job_cmd + puts $fd $set_tmp_dir + puts $fd $job(cmd) close $fd set fd [open "|$TRG(runcmd) 2>@1" r] cd $pwd From 1769640c8be768f42b9a25d175f7d2760a6534bc Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 13 Mar 2024 10:54:04 +0000 Subject: [PATCH 08/14] Add pointer to documentation to testrunner.tcl help message. FossilOrigin-Name: eff855102f9c0b4e9d876d1cff9d06c07de427b4880c2fa326d4d6e3e1dd13c8 --- doc/testrunner.md | 1 - manifest | 14 +++++++------- manifest.uuid | 2 +- test/testrunner.tcl | 2 ++ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/testrunner.md b/doc/testrunner.md index d420076c4f..f7fd296718 100644 --- a/doc/testrunner.md +++ b/doc/testrunner.md @@ -17,7 +17,6 @@
  • 3.3. Investigating Source Code Test Failures
  • 4. Extra testrunner.tcl Options -# 4. Extra testrunner.tcl Options
  • 5. Controlling CPU Core Utilization diff --git a/manifest b/manifest index 2735ee46af..38fcd0cd0c 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Have\stestrunner.tcl\sset\sSQLITE_TMPDIR\son\swindows\sas\swell. -D 2024-03-13T10:47:54.860 +C Add\spointer\sto\sdocumentation\sto\stestrunner.tcl\shelp\smessage. +D 2024-03-13T10:54:04.498 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -44,7 +44,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706 F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710 -F doc/testrunner.md 8d36ec692cf4994bb66d84a4645b9afa1ce9d47dc12cbf8d437c5a5fb6ddeedb +F doc/testrunner.md 7d16aa94aec424d5316be7f336f84f2961ab4e5e0acbc54bc610a80c4cbd87de F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56 F doc/vfs-shm.txt e101f27ea02a8387ce46a05be2b1a902a021d37a @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl 29b60469f0bd1aa717507e2ec7660128894914def0f058bb6752c9bdfe61bbaa +F test/testrunner.tcl cc3e416435f9bef832fb5e9f2b09e9d365faec77544573a9d9dc7b0f95b1120d F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 1b7f0be44036fb90d763eabae84b95734e766f8010b39122f8787189308a7fc1 -R 3f6a714f6a93dd220bd97ec3c31ac4b4 +P 64f4dad1f928716b8688c650d043f18afcc72ec78d990145c580e2b98905b919 +R 1134b8266271a887377fc4f455ed517a U dan -Z 4ab7e95a7dcf535e4920c95d1b703486 +Z 833508436e05f778ed8b702f9da8c8a7 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index ee62c57213..b4442bcf4f 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -64f4dad1f928716b8688c650d043f18afcc72ec78d990145c580e2b98905b919 \ No newline at end of file +eff855102f9c0b4e9d876d1cff9d06c07de427b4880c2fa326d4d6e3e1dd13c8 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index f05b399e3a..439ccb0886 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -95,6 +95,8 @@ of sub-processes the test script uses to run tests. The "script" command outputs the script used to build a configuration. Add the "-msvc" option for a Windows-compatible script. For a list of available configurations enter "$a0 script help". + +Full documentation here: https://sqlite.org/src/doc/trunk/doc/testrunner.md }]] exit 1 From 484193fe7f7dccc1371757e339569f7c5c3e8bea Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 13 Mar 2024 10:55:47 +0000 Subject: [PATCH 09/14] Improvements to the "help" message generated by testrunner.tcl. Add the special "list" permutation that does nothing but list all allowed values for the PERMUTATION argument to testrunner.tcl. FossilOrigin-Name: 1f5bfc6a9030f9905d258c5b665b9ff27efc7da71556c912ab3dce0f8f5aa8da --- manifest | 14 +++++++------- manifest.uuid | 2 +- test/testrunner.tcl | 34 ++++++++++++++++++++++++++++++---- 3 files changed, 38 insertions(+), 12 deletions(-) diff --git a/manifest b/manifest index 38fcd0cd0c..6f92138cec 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\spointer\sto\sdocumentation\sto\stestrunner.tcl\shelp\smessage. -D 2024-03-13T10:54:04.498 +C Improvements\sto\sthe\s"help"\smessage\sgenerated\sby\stestrunner.tcl.\s\sAdd\sthe\nspecial\s"list"\spermutation\sthat\sdoes\snothing\sbut\slist\sall\sallowed\nvalues\sfor\sthe\sPERMUTATION\sargument\sto\stestrunner.tcl. +D 2024-03-13T10:55:47.181 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl cc3e416435f9bef832fb5e9f2b09e9d365faec77544573a9d9dc7b0f95b1120d +F test/testrunner.tcl acc25035b127471961ff8f77b829dc51a9615b1016bb874a339733b4c0881f30 F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 64f4dad1f928716b8688c650d043f18afcc72ec78d990145c580e2b98905b919 -R 1134b8266271a887377fc4f455ed517a -U dan -Z 833508436e05f778ed8b702f9da8c8a7 +P eff855102f9c0b4e9d876d1cff9d06c07de427b4880c2fa326d4d6e3e1dd13c8 +R 932e56d0dea34c025007477ebbf78453 +U drh +Z 0cfae733ff130354c2d77ebd401ddd94 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index b4442bcf4f..2f15429b49 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -eff855102f9c0b4e9d876d1cff9d06c07de427b4880c2fa326d4d6e3e1dd13c8 \ No newline at end of file +1f5bfc6a9030f9905d258c5b665b9ff27efc7da71556c912ab3dce0f8f5aa8da \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 439ccb0886..ba3d9b5533 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -65,13 +65,19 @@ Usage: --jobs NUMBER-OF-JOBS --zipvfs ZIPVFS-SOURCE-DIR -Interesting values for PERMUTATION are: +Special values for PERMUTATION that work with plain tclsh: + + list - show all allowed PERMUTATION arguments. + mdevtest - tests recommended prior to normal development check-ins. + release - full release test with various builds. + sdevtest - like mdevtest but using ASAN and UBSAN. + +Other PERMUTATION arguments must be run using testfixture, not tclsh: - veryquick - a fast subset of the tcl test scripts. This is the default. - full - all tcl test scripts. all - all tcl test scripts, plus a subset of test scripts rerun with various permutations. - release - full release test with various builds. + full - all tcl test scripts. + veryquick - a fast subset of the tcl test scripts. This is the default. If no PATTERN arguments are present, all tests specified by the PERMUTATION are run. Otherwise, each pattern is interpreted as a glob pattern. Only @@ -836,6 +842,17 @@ proc add_devtest_jobs {lBld patternlist} { } } +# Check to ensure that the interpreter is a full-blown "testfixture" +# build and not just a "tclsh". If this is not the case, issue an +# error message and exit. +# +proc must_be_testfixture {} { + if {[lsearch [info commands] sqlite3_soft_heap_limit]<0} { + puts "Use ./testfixture, not tclsh, for these arguments" + exit 1 + } +} + proc add_jobs_from_cmdline {patternlist} { global TRG @@ -851,6 +868,7 @@ proc add_jobs_from_cmdline {patternlist} { set first [lindex $patternlist 0] switch -- $first { all { + must_be_testfixture set patternlist [lrange $patternlist 1 end] set clist [trd_all_configs] foreach c $clist { @@ -886,7 +904,15 @@ proc add_jobs_from_cmdline {patternlist} { } } + list { + set allperm [array names ::testspec] + lappend allperm all mdevtest sdevtest release list + puts "Allowed values for the PERMUTATION argument: [lsort $allperm]" + exit 0 + } + default { + must_be_testfixture if {[info exists ::testspec($first)]} { add_tcl_jobs "" $first [lrange $patternlist 1 end] } else { From c2764dbb3310922cf3127c057c508804353230c7 Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 13 Mar 2024 11:29:04 +0000 Subject: [PATCH 10/14] Minor tweaks to the testrunner documentation. FossilOrigin-Name: 3128b98d2656c7f23f6071c173f96329c7bdc49cd641050fbb7b105b810ba7c7 --- doc/testrunner.md | 27 +++++++++++++++------------ manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/doc/testrunner.md b/doc/testrunner.md index f7fd296718..470c770f1d 100644 --- a/doc/testrunner.md +++ b/doc/testrunner.md @@ -28,12 +28,18 @@ multiple jobs. It supports the following types of tests: * Tcl test scripts. - * Tests run with [make] commands. Specifically, at time of writing, - [make fuzztest], [make mptest], [make sourcetest] and [make threadtest]. + * Tests run with `make` commands. Examples: + - `make mdevtest` + - `make releasetest` + - `make sdevtest` + - `make testrunner` testrunner.tcl pipes the output of all tests and builds run into log file -**testrunner.log**, created in the cwd directory. Searching this file for -"failed" is a good way to find the output of a failed test. +**testrunner.log**, created in the current working directory. Search this +file to find details of errors. Suggested search commands: + + * `grep "^!" testrunner.log` + * `grep failed testrunner.log` testrunner.tcl also populates SQLite database **testrunner.db**. This database contains details of all tests run, running and to be run. A useful query @@ -59,7 +65,7 @@ Running: in another terminal is a good way to keep an eye on a long running test. -Sometimes testrunner.tcl uses the [testfixture] binary that it is run with +Sometimes testrunner.tcl uses the `testfixture` binary that it is run with to run tests (see "Binary Tests" below). Sometimes it builds testfixture and other binaries in specific configurations to test (see "Source Tests"). @@ -67,9 +73,9 @@ other binaries in specific configurations to test (see "Source Tests"). # 2. Binary Tests The commands described in this section all run various combinations of the Tcl -test scripts using the [testfixture] binary used to run the testrunner.tcl +test scripts using the `testfixture` binary used to run the testrunner.tcl script (i.e. they do not invoke the compiler to build new binaries, or the -[make] command to run tests that are not Tcl scripts). The procedure to run +`make` command to run tests that are not Tcl scripts). The procedure to run these tests is therefore: 1. Build the "testfixture" (or "testfixture.exe" for windows) binary using @@ -192,7 +198,7 @@ TODO: ./configure + Makefile.msc build systems. ## 3.1. Commands to Run SQLite Tests The **mdevtest** command is equivalent to running the veryquick tests and -the [make fuzztest] target once for each of two --enable-all builds - one +the `make fuzztest` target once for each of two --enable-all builds - one with debugging enabled and one without: ``` @@ -282,7 +288,7 @@ a dos \*.bat file on windows. For example: ``` The generated bash or \*.bat file script accepts a single argument - a makefile -target to build. This may be used either to run a [make] command test directly, +target to build. This may be used either to run a `make` command test directly, or else to build a testfixture (or testfixture.exe) binary with which to run a Tcl test script, as described above. @@ -338,6 +344,3 @@ testrunner.log and testrunner.db files: ``` $ ./testfixture $TESTDIR/testrunner.tcl njob $NEW_NUMBER_OF_JOBS ``` - - - diff --git a/manifest b/manifest index 6f92138cec..ea1d4a7d34 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Improvements\sto\sthe\s"help"\smessage\sgenerated\sby\stestrunner.tcl.\s\sAdd\sthe\nspecial\s"list"\spermutation\sthat\sdoes\snothing\sbut\slist\sall\sallowed\nvalues\sfor\sthe\sPERMUTATION\sargument\sto\stestrunner.tcl. -D 2024-03-13T10:55:47.181 +C Minor\stweaks\sto\sthe\stestrunner\sdocumentation. +D 2024-03-13T11:29:04.049 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -44,7 +44,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706 F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710 -F doc/testrunner.md 7d16aa94aec424d5316be7f336f84f2961ab4e5e0acbc54bc610a80c4cbd87de +F doc/testrunner.md 50570a63efb68fd1472cbe7eeccf78c7b7d66ac1f966ab18d29f824f7cdba2b3 F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56 F doc/vfs-shm.txt e101f27ea02a8387ce46a05be2b1a902a021d37a @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P eff855102f9c0b4e9d876d1cff9d06c07de427b4880c2fa326d4d6e3e1dd13c8 -R 932e56d0dea34c025007477ebbf78453 +P 1f5bfc6a9030f9905d258c5b665b9ff27efc7da71556c912ab3dce0f8f5aa8da +R f1d87f081beab0bb7e2677dcc20d7af9 U drh -Z 0cfae733ff130354c2d77ebd401ddd94 +Z 7d008234f4102bc09ae556028dcb2b0f # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 2f15429b49..f66ed3c2e4 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -1f5bfc6a9030f9905d258c5b665b9ff27efc7da71556c912ab3dce0f8f5aa8da \ No newline at end of file +3128b98d2656c7f23f6071c173f96329c7bdc49cd641050fbb7b105b810ba7c7 \ No newline at end of file From 9b6e535609a114846a4570d263533845b6cf0f77 Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 13 Mar 2024 11:46:23 +0000 Subject: [PATCH 11/14] Improve one of the error messages from testrunner.tcl. FossilOrigin-Name: 233155c174575fa99b34030c1936bc2b04489417f4d5223f18cdb3c8fc274a56 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/manifest b/manifest index ea1d4a7d34..a67db52106 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Minor\stweaks\sto\sthe\stestrunner\sdocumentation. -D 2024-03-13T11:29:04.049 +C Improve\sone\sof\sthe\serror\smessages\sfrom\stestrunner.tcl. +D 2024-03-13T11:46:23.016 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl acc25035b127471961ff8f77b829dc51a9615b1016bb874a339733b4c0881f30 +F test/testrunner.tcl cdbfe4b24952a411fcc2cb48331d10ece650b6a3108bd05ae890304cfed93fed F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 1f5bfc6a9030f9905d258c5b665b9ff27efc7da71556c912ab3dce0f8f5aa8da -R f1d87f081beab0bb7e2677dcc20d7af9 +P 3128b98d2656c7f23f6071c173f96329c7bdc49cd641050fbb7b105b810ba7c7 +R b30ace34515f0911b2a0db585efbc51d U drh -Z 7d008234f4102bc09ae556028dcb2b0f +Z 4fb6ed0f5ce1c12c4ccfa1c6192fc974 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index f66ed3c2e4..7d5581e36c 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -3128b98d2656c7f23f6071c173f96329c7bdc49cd641050fbb7b105b810ba7c7 \ No newline at end of file +233155c174575fa99b34030c1936bc2b04489417f4d5223f18cdb3c8fc274a56 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index ba3d9b5533..76a73a6ba7 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -848,7 +848,7 @@ proc add_devtest_jobs {lBld patternlist} { # proc must_be_testfixture {} { if {[lsearch [info commands] sqlite3_soft_heap_limit]<0} { - puts "Use ./testfixture, not tclsh, for these arguments" + puts "Use testfixture, not tclsh, for these arguments." exit 1 } } From 4659ec34c1c5ffceb64ce486502acb92f14688eb Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 13 Mar 2024 13:09:58 +0000 Subject: [PATCH 12/14] Add the --explain option to testrunner.tcl. FossilOrigin-Name: f0c9eb0326f189fe5ebbee83532ac2c413e91c6a8e9d5b93aa6170cba66fdd22 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 45 ++++++++++++++++++++++++++++++++++++++------- 3 files changed, 45 insertions(+), 14 deletions(-) diff --git a/manifest b/manifest index a67db52106..683882b1c4 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Improve\sone\sof\sthe\serror\smessages\sfrom\stestrunner.tcl. -D 2024-03-13T11:46:23.016 +C Add\sthe\s--explain\soption\sto\stestrunner.tcl. +D 2024-03-13T13:09:58.491 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl cdbfe4b24952a411fcc2cb48331d10ece650b6a3108bd05ae890304cfed93fed +F test/testrunner.tcl f172c5141b890acfc223884071f90176031e3a059218280952f536eb2c851ee8 F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 3128b98d2656c7f23f6071c173f96329c7bdc49cd641050fbb7b105b810ba7c7 -R b30ace34515f0911b2a0db585efbc51d +P 233155c174575fa99b34030c1936bc2b04489417f4d5223f18cdb3c8fc274a56 +R 73b7b3b0e43269248a0a7f9b5744d286 U drh -Z 4fb6ed0f5ce1c12c4ccfa1c6192fc974 +Z bad41bec7a1c5ea3149d7911ab3a6c38 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 7d5581e36c..6ccc32a8fd 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -233155c174575fa99b34030c1936bc2b04489417f4d5223f18cdb3c8fc274a56 \ No newline at end of file +f0c9eb0326f189fe5ebbee83532ac2c413e91c6a8e9d5b93aa6170cba66fdd22 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 76a73a6ba7..96494dc3a5 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -62,6 +62,7 @@ Usage: where SWITCHES are: --buildonly --dryrun + --explain --jobs NUMBER-OF-JOBS --zipvfs ZIPVFS-SOURCE-DIR @@ -166,6 +167,7 @@ set TRG(fuzztest) 0 ;# is the fuzztest option present. set TRG(zipvfs) "" ;# -zipvfs option, if any set TRG(buildonly) 0 ;# True if --buildonly option set TRG(dryrun) 0 ;# True if --dryrun option +set TRG(explain) 0 ;# True for the --explain option switch -nocase -glob -- $tcl_platform(os) { *darwin* { @@ -460,6 +462,8 @@ for {set ii 0} {$ii < [llength $argv]} {incr ii} { set TRG(buildonly) 1 } elseif {($n>2 && [string match "$a*" --dryrun]) || $a=="-d"} { set TRG(dryrun) 1 + } elseif {($n>2 && [string match "$a*" --explain]) || $a=="-e"} { + set TRG(explain) 1 } else { usage } @@ -1177,15 +1181,42 @@ proc handle_buildonly {} { } } +# Handle the --explain option. Provide a human-readable +# explanation of all the tests that are in the trdb database jobs +# table. +# +proc explain_layer {indent depid} { + global TRG + if {$TRG(buildonly)} { + set showtests 0 + } else { + set showtests 1 + } + trdb eval {SELECT jobid, displayname, displaytype, dirname + FROM jobs WHERE depid=$depid ORDER BY displayname} { + if {$displaytype=="bld"} { + puts "${indent}$displayname in $dirname" + explain_layer "${indent} " $jobid + } elseif {$showtests} { + puts "${indent}[lindex $displayname end]" + } + } +} +proc explain_tests {} { + explain_layer "" "" +} + sqlite3 trdb $TRG(dbname) trdb timeout $TRG(timeout) set tm [lindex [time { make_new_testset }] 0] -if {$TRG(nJob)>1} { - puts "splitting work across $TRG(nJob) jobs" +if {$TRG(explain)} { + explain_tests +} else { + if {$TRG(nJob)>1} { + puts "splitting work across $TRG(nJob) jobs" + } + puts "built testset in [expr $tm/1000]ms.." + handle_buildonly + run_testset } -puts "built testset in [expr $tm/1000]ms.." - -handle_buildonly -run_testset trdb close -#puts [pwd] From 4565c8417b1ff0f188fe7272f7049f2c33ced134 Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 13 Mar 2024 13:27:16 +0000 Subject: [PATCH 13/14] Document the testrunner.tcl --explain option in doc/testrunner.md. FossilOrigin-Name: 5a7b5fc99a9d5c7693a5707c2050a8c59a8f97732e4763a56982579f8d5959ec --- doc/testrunner.md | 10 ++++++++++ manifest | 12 ++++++------ manifest.uuid | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doc/testrunner.md b/doc/testrunner.md index 470c770f1d..d0248573ee 100644 --- a/doc/testrunner.md +++ b/doc/testrunner.md @@ -315,6 +315,16 @@ would normally execute into the testrunner.log file. Example: tclsh $TESTDIR/testrunner.tcl --dryrun mdevtest" ``` +The **--explain** option is similar to --dryrun in that it prevents testrunner.tcl +from building any binaries or running any tests. The difference is that --explain +prints on standard output a human-readable summary of all the builds and tests that +would have been run. + +``` + # Show what builds and tests would have been run + tclsh $TESTDIR/testrunner.tcl --explain mdevtest +``` + # 5. Controlling CPU Core Utilization diff --git a/manifest b/manifest index 683882b1c4..a5d47b0edb 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sthe\s--explain\soption\sto\stestrunner.tcl. -D 2024-03-13T13:09:58.491 +C Document\sthe\stestrunner.tcl\s--explain\soption\sin\sdoc/testrunner.md. +D 2024-03-13T13:27:16.812 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -44,7 +44,7 @@ F doc/json-enhancements.md e356fc834781f1f1aa22ee300027a270b2c960122468499bf347b F doc/jsonb.md 5fab4b8613aa9153fbeb6259297bd4697988af8b3d23900deba588fa7841456b F doc/lemon.html 8b266ff711d2ec7f867c3dca37634963f48a630329908cc282beebfa8c708706 F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710 -F doc/testrunner.md 50570a63efb68fd1472cbe7eeccf78c7b7d66ac1f966ab18d29f824f7cdba2b3 +F doc/testrunner.md 15583cf8c7d8a1c3378fd5d4319ca769a14c4d950a5df9b015d01d5be290dc69 F doc/trusted-schema.md 33625008620e879c7bcfbbfa079587612c434fa094d338b08242288d358c3e8a F doc/vdbesort-memory.md 4da2639c14cd24a31e0af694b1a8dd37eaf277aff3867e9a8cc14046bc49df56 F doc/vfs-shm.txt e101f27ea02a8387ce46a05be2b1a902a021d37a @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 233155c174575fa99b34030c1936bc2b04489417f4d5223f18cdb3c8fc274a56 -R 73b7b3b0e43269248a0a7f9b5744d286 +P f0c9eb0326f189fe5ebbee83532ac2c413e91c6a8e9d5b93aa6170cba66fdd22 +R 4e0be3056348c8f1e7d2864a45b77c77 U drh -Z bad41bec7a1c5ea3149d7911ab3a6c38 +Z 5cfab6cb98d5a454aa1c2e14d97de81e # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 6ccc32a8fd..b5e8f2c31e 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -f0c9eb0326f189fe5ebbee83532ac2c413e91c6a8e9d5b93aa6170cba66fdd22 \ No newline at end of file +5a7b5fc99a9d5c7693a5707c2050a8c59a8f97732e4763a56982579f8d5959ec \ No newline at end of file From 6bb6a9c94162ec7faf5489bca4fbebbe90901604 Mon Sep 17 00:00:00 2001 From: drh <> Date: Wed, 13 Mar 2024 13:43:21 +0000 Subject: [PATCH 14/14] If the NJOB environment variable is a positive integer, it causes testrunner.tcl to run that many jobs. FossilOrigin-Name: 924281b94d8e6ba674d6fe2f7f01da890351355a854e9e6fe623fad1180f7392 --- manifest | 12 ++++++------ manifest.uuid | 2 +- test/testrunner.tcl | 4 ++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/manifest b/manifest index a5d47b0edb..f47cb0a280 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Document\sthe\stestrunner.tcl\s--explain\soption\sin\sdoc/testrunner.md. -D 2024-03-13T13:27:16.812 +C If\sthe\sNJOB\senvironment\svariable\sis\sa\spositive\sinteger,\sit\scauses\ntestrunner.tcl\sto\srun\sthat\smany\sjobs. +D 2024-03-13T13:43:21.042 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -1687,7 +1687,7 @@ F test/temptable2.test 76821347810ecc88203e6ef0dd6897b6036ac788e9dd3e6b04fd4d163 F test/temptable3.test d11a0974e52b347e45ee54ef1923c91ed91e4637 F test/temptrigger.test 38f0ca479b1822d3117069e014daabcaacefffcc F test/tester.tcl fe617b88c7eb08bdf983d2aaa31c20fbf439eee7b8e0d61ca636fcd0c305bbbf -F test/testrunner.tcl f172c5141b890acfc223884071f90176031e3a059218280952f536eb2c851ee8 +F test/testrunner.tcl 48e33d99f0bad37a03b8a4064a44184de4c4ed8cd2e3174fef8d7c5f4e28ecc3 F test/testrunner_data.tcl 2f94974e5e3a56af880be72f7a7fd239aa9d4ecf978625435fcc698319c927fa F test/thread001.test a0985c117eab62c0c65526e9fa5d1360dd1cac5b03bde223902763274ce21899 F test/thread002.test c24c83408e35ba5a952a3638b7ac03ccdf1ce4409289c54a050ac4c5f1de7502 @@ -2177,8 +2177,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P f0c9eb0326f189fe5ebbee83532ac2c413e91c6a8e9d5b93aa6170cba66fdd22 -R 4e0be3056348c8f1e7d2864a45b77c77 +P 5a7b5fc99a9d5c7693a5707c2050a8c59a8f97732e4763a56982579f8d5959ec +R 407830b5c90e1eed2d3fe5c7fa3b86c4 U drh -Z 5cfab6cb98d5a454aa1c2e14d97de81e +Z 7cb4f1a4becd0bff0730a94c93a2e20f # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index b5e8f2c31e..a1fceec15d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5a7b5fc99a9d5c7693a5707c2050a8c59a8f97732e4763a56982579f8d5959ec \ No newline at end of file +924281b94d8e6ba674d6fe2f7f01da890351355a854e9e6fe623fad1180f7392 \ No newline at end of file diff --git a/test/testrunner.tcl b/test/testrunner.tcl index 96494dc3a5..b201a263d1 100644 --- a/test/testrunner.tcl +++ b/test/testrunner.tcl @@ -141,6 +141,10 @@ proc guess_number_of_cores {} { } proc default_njob {} { + global env + if {[info exists env(NJOB)] && $env(NJOB)>=1} { + return $env(NJOB) + } set nCore [guess_number_of_cores] if {$nCore<=2} { set nHelper 1