Files
binutils-gdb/gdb/testsuite/gdb.python
Tom de Vries 1dc13c7e9f [gdb/testsuite] Fix gdb.python/py-startup-opt.exp with empty PYTHONDONTWRITEBYTECODE
When running test-case gdb.python/py-startup-opt.exp with empty
PYTHONDONTWRITEBYTECODE:
...
$ cd build/gdb/testsuite
$ PYTHONDONTWRITEBYTECODE= make check \
    RUNTESTFLAGS=gdb.python/py-startup-opt.exp
...
I get:
...
end^M
dont_write_bytecode is off^M
(gdb) FAIL: $exp: attr=dont_write_bytecode: testname: input 6: end
...

The problem is that the test-case expects dont_write_bytecode to be
on, which is incorrect because PYTHONDONTWRITEBYTECODE only has effect if set
to a non-empty string [1].

Fix this by correctly setting expectations in the test-case.

Tested on x86_64-linux, with:
- PYTHONDONTWRITEBYTECODE=
- PYTHONDONTWRITEBYTECODE=1
- unset PYTHONDONTWRITEBYTECODE

Approved-By: Tom Tromey <tom@tromey.com>

[1] https://docs.python.org/3/using/cmdline.html#envvar-PYTHONDONTWRITEBYTECODE
2024-12-03 22:54:23 +01:00
..
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-11-11 07:22:24 -07:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-04-02 11:21:39 -06:00
2024-11-01 11:06:47 -06:00
2024-11-01 11:06:47 -06:00