[Tarantool-patches] [PATCH luajit 3/3] test: add verbose mode for debug extension tests
Sergey Kaplun
skaplun at tarantool.org
Sun Jun 28 18:19:42 MSK 2026
Hi, Evgeniy!
Thanks for the review!
Fixed your comments and force-pushed the branch.
On 28.06.26, Evgeniy Temirgaleev wrote:
> Hi, Sergey!
>
> Thanks for the patch!
>
> LGTM after fixing the comments.
>
> --
> Best regards,
> Evgeniy Temirgaleev
>
> >
> > От кого: Sergey Kaplun <skaplun at tarantool.org>
> > Кому: Sergey Bronnikov <sergeyb at tarantool.org>, Evgeniy Temirgaleev <e.temirgaleev at tarantool.org
> > >
> > Копия: tarantool-patches at dev.tarantool.org, Sergey Kaplun <skaplun at tarantool.org
> > >
> > Дата: Четверг, 25 июня 2026, 23:29 +03:00
> > If the environment variable `DUBUGGER_TEST_VERBOSE` is set, each test
Updated the commit message:
| test: add verbose mode for debug extension tests
|
| If the environment variable `DEBUGGER_TEST_VERBOSE` is set, each test
| prints the generated command and its output and doesn't delete the files
| generated for it.
> > prints the generated command and its output and doesn't delete the files
> > generated for it.
> > ---
> > test/tarantool-debugger-tests/debug-extension-tests.py | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/test/tarantool-debugger-tests/debug-extension-tests.py
> > b/test/tarantool-debugger-tests/debug-extension-tests.py
> > index fc5d2c7b..adb83e1e 100644
> > --- a/test/tarantool-debugger-tests/debug-extension-tests.py
> > +++ b/test/tarantool-debugger-tests/debug-extension-tests.py
> > @@ -43,6 +43,8 @@ else:
> > # Don't run any initialization scripts.
> > RUN_CMD_FILE = ['--batch', '--nx', '--quiet', '--command']
> >
> > +TEST_VERBOSE = os.getenv('DUBUGGER_TEST_VERBOSE', default=False)
> >
>
> Typo: /DU/DE/
Fixed, thanks!
===================================================================
diff --git a/test/tarantool-debugger-tests/debug-extension-tests.py b/test/tarantool-debugger-tests/debug-extension-tests.py
index adb83e1e..9bf375d5 100644
--- a/test/tarantool-debugger-tests/debug-extension-tests.py
+++ b/test/tarantool-debugger-tests/debug-extension-tests.py
@@ -43,7 +43,7 @@ else:
# Don't run any initialization scripts.
RUN_CMD_FILE = ['--batch', '--nx', '--quiet', '--command']
-TEST_VERBOSE = os.getenv('DUBUGGER_TEST_VERBOSE', default=False)
+TEST_VERBOSE = os.getenv('DEBUGGER_TEST_VERBOSE', default=False)
RX_ADDR = r'0x[a-f0-9]+'
RX_HASH = RX_ADDR # The same pattern for hexademic values.
===================================================================
>
> >
> > +
> > RX_ADDR = r'0x[a-f0-9]+'
> > RX_HASH = RX_ADDR # The same pattern for hexademic values.
> > RX_BCN = r'00\d\d'
> > @@ -52,7 +54,7 @@ RX_IRREF = r'0x\d\d\d\d'
> >
> >
> > def persist(data):
> > - tmp = tempfile.NamedTemporaryFile(mode='w')
> > + tmp = tempfile.NamedTemporaryFile(mode='w', delete=not TEST_VERBOSE)
> > tmp.write(data)
> > tmp.flush()
> > return tmp
> > @@ -149,7 +151,12 @@ class TestCaseBase(unittest.TestCase):
> > LUAJIT_BINARY,
> > script_file.name,
> > ]
> > + if TEST_VERBOSE:
> > + print('# Test name: {}'.format(cls.__name__))
> > + print('# Test command: {}'.format(' '.join(process_cmd)))
> > cls.output = execute_process(process_cmd)
> > + if TEST_VERBOSE:
> > + print('# Command output: {}'.format(cls.output))
> >
>
> Please, append a new line before command (multiline) output.
Added:
===================================================================
diff --git a/test/tarantool-debugger-tests/debug-extension-tests.py b/test/tarantool-debugger-tests/debug-extension-tests.py
index 9bf375d5..8e069fe0 100644
--- a/test/tarantool-debugger-tests/debug-extension-tests.py
+++ b/test/tarantool-debugger-tests/debug-extension-tests.py
@@ -156,7 +156,7 @@ class TestCaseBase(unittest.TestCase):
print('# Test command: {}'.format(' '.join(process_cmd)))
cls.output = execute_process(process_cmd)
if TEST_VERBOSE:
- print('# Command output: {}'.format(cls.output))
+ print('# Command output:\n{}'.format(cls.output))
cmd_file.close()
script_file.close()
===================================================================
>
> >
> > cmd_file.close()
> > script_file.close()
> >
> > --
> > 2.54.0
> >
--
Best regards,
Sergey Kaplun
More information about the Tarantool-patches
mailing list