summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/run_tests.sh
AgeCommit message (Collapse)Author
2022-03-15tests: run_tests.sh: pass dummy value to `-T` flagJo-Philipp Wich
Since OS X `getopt()` does not handle optional arguments, we need to always pass a value to `-T`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-03-15tests: run_tests.sh: use greadlink if availableJo-Philipp Wich
This ensures that GNU readlink is preferred over OS X own readlink when executing test cases. This is required due to lacking `-f` flag support on OS X. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-03-14main: rework CLI frontendJo-Philipp Wich
- Change command line flags to be align better with those of other interpreters and with the gcc compiler, e.g. `-D` and `-U` to define and undefine globals, `-e` to execute script expression etc. - Pass only excess CLI arguments as `ARGV` to scripts, e.g. `ucode -e 'print("Hello world")' -- -x -y` would pass only `[ "-x", "-y" ]` as ARGV contents - Default to raw mode and introduce flag to enable template mode Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-03run_tests.sh: change workdir to testcase directory during executionJo-Philipp Wich
Ensure that that the testcase files are executed within the temporary testcase work directory to simplify testing relative path resolution. Also fixup the duplicate resource regression test breaking due to that. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-03run_tests.sh: support placing supplemental testcase filesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-03run_tests.sh: always treat outputs as text dataJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-01-26run_tests.sh: add ability to define environment variables for testcasesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-01-26run_tests.sh: fix exitcode evaluationJo-Philipp Wich
The `touch` command result incorrectly shadowed the testcase exit code. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-09-19tests: support specifying cmdline args in testcase filesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-04-29lexer: fix infinite loop when parsing regexp literal at EOFJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-04-27tests: pass ucode library path through environmentJo-Philipp Wich
This is required for out-of-tree builds where the *.so file location cannot be derived from the path of the ucode executable. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-04-24tests: allow executing run_tests.sh from any directoryJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-04-23tests: custom: return exit code if tests failsPetr Štetiar
Otherwise tests always pass in ctest. Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-04-23tests: create custom tests from current tests casesPetr Štetiar
Signed-off-by: Petr Štetiar <ynezz@true.cz>