From 134de06341d7d7041e6a3cb8a70c2c3f12c2b6b5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 17 Sep 2016 22:19:53 +0200 Subject: Update feature: Test description language (testscript) --- build2/test/testscript | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'build2') diff --git a/build2/test/testscript b/build2/test/testscript index d7a70f6..cf64e49 100644 --- a/build2/test/testscript +++ b/build2/test/testscript @@ -26,6 +26,14 @@ Requirements * Ability to pass arguments from build files (how for multiple scripts?) Could use $0, $1, $*. +? if/else, loops (we will have ternary operator as part of eval context) + +* Multi-line comments (to disable a chunk of test; #\) + +* Ability to suppress output (/dev/null) + +* Ability not to clean up output (if failed) + Questions ========= @@ -41,6 +49,13 @@ Questions Maybe {}? Will need it not to clean up output files too early. Also var scope. +* What if we need to define some global variables for the entire script? + +* Ability to include testscripts (for grouping/organization purposes). Also + include common definitions? + +* Ability to redefine $0 (e.g., to src_base to run scripts)? + Notes ===== @@ -101,7 +116,7 @@ EOE ~ Output file redirects should be relative to out_base. Input? Could actually track created out files and use that if exists, and src otherwise. What if the test create a file without a redirect? Will need to "register" it - somehow for auto-cleanup. Maybe &? + somehow for auto-cleanup. Maybe &? Also for directories &/. ~ Will there be a way to combine stderr and stdout, could be useful sometimes (e.g., order of output relative to diagnostics). 2>& syntax? @@ -131,3 +146,18 @@ EOE ~ line continuation with \ ~ == != + +~ Specify named variables instead/in addition to arguments + + ...: test = test1 test2 + ...: test.test1.var1 = ... + +~ Perhaps the default variable type should be strings, not names? Thought + we reverse most things pretty well. + +~ CWD should probably be running tests in out_base (so if they create some + files). + +~ Clean up is tricky: sometimes we may want to keep it, but then how to clean + it up later (the test might fail if there is junk present). Maybe create + temp directory in out_base and run there? Will also help with parallel runs. -- cgit v1.1