Refactor testscript to facilitate running subsets of tests#2314
Refactor testscript to facilitate running subsets of tests#2314mazunki wants to merge 10 commits intoincludeos:mainfrom
Conversation
|
Thanks for giving test.sh some love! I like the idea of allowing the user to run specific categories of tests, but I would prefer if the categories were derived from the folder structure and not introduced as custom functions; this to reduce maintenance. I realize that the folder structure could probably use some improvement (the memory tests, for example, were hard to find), but then let's fix that instead, in a separate PR. So we can keep your outer loop, iterating over parameters, but I prefer that we then match against directory names or full paths, either with exact match or regex, but keep the script as simple as possible. |
Interesting, I think I agree. I will work on that after #2316 is realized, since this will already have a bunch of merge conflicts once/if that gets merged.
Yep, that should probably come first then. I'm putting this PR on hold until those are addressed. |
|
This probably requires a do-over to avoid merge conflicts later down the line. Might be easier to rewrite the whole file too. I'd like to introduce the following:
|
This PR refactors the
./test.shscript with three major goals:./test.sh net_testsFurthermore there's additionally an option to silence the output of the inner tests through the
TESTS_STDOUTandTESTS_STDERRvariables. I findTESTS_STDOUT=/dev/null ./test.shparticularly useful.See
./test.sh helpfor a list of targets. Running./test.shwith no arguments (or./test.sh all) runs the same tests it always did.There's also a
custom_testsmock function which just aims to make quick iteration easier.