rename visualize-storage as visualize-config

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
Brian S. Stephan 2024-04-12 10:39:29 -05:00
parent 79ea02a968
commit 65ae51af72
Signed by: bss
GPG Key ID: 3DE06D3180895FCB
3 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@ latest Protobuf files if you can.
An example of this invocation is:
`visualize-storage -P ~/proj/GP2040-CE/proto -P ~/proj/GP2040-CE/lib/nanopb/generator/proto --filename memory.bin`
`visualize-config -P ~/proj/GP2040-CE/proto -P ~/proj/GP2040-CE/lib/nanopb/generator/proto --filename memory.bin`
## Installation
@ -119,9 +119,9 @@ Sample usage:
% dump-gp2040ce `date +%Y%m%d`-backup.bin
```
### visualize-storage
### visualize-config
`visualize-storage` reads a GP2040-CE board's configuration, either over USB or from a dump of the board's flash
`visualize-config` reads a GP2040-CE board's configuration, either over USB or from a dump of the board's flash
storage section, and prints it out for visual inspection or diffing with other tools. It can also find the storage
section from a GP2040-CE whole board dump, if you have that instead. Usage is simple; just connect your board in BOOTSEL
mode or pass the tool your binary file to analyze along with the path to the Protobuf files.
@ -129,7 +129,7 @@ mode or pass the tool your binary file to analyze along with the path to the Pro
Sample output:
```
% visualize-storage --usb
% visualize-config --usb
boardVersion: "v0.7.2"
gamepadOptions {
inputMode: INPUT_MODE_HID

View File

@ -38,7 +38,7 @@ concatenate = "gp2040ce_bintools.builder:concatenate"
dump-config = "gp2040ce_bintools.storage:dump_config"
dump-gp2040ce = "gp2040ce_bintools.builder:dump_gp2040ce"
edit-config = "gp2040ce_bintools.gui:edit_config"
visualize-storage = "gp2040ce_bintools.storage:visualize"
visualize-config = "gp2040ce_bintools.storage:visualize"
[tool.flake8]
enable-extensions = "G,M"

View File

@ -29,14 +29,14 @@ def with_pb2s(test, *args, **kwargs):
def test_version_flag():
"""Test that tools report the version."""
result = run(['visualize-storage', '-v'], capture_output=True, encoding='utf8')
result = run(['visualize-config', '-v'], capture_output=True, encoding='utf8')
assert __version__ in result.stdout
def test_help_flag():
"""Test that tools report the usage information."""
result = run(['visualize-storage', '-h'], capture_output=True, encoding='utf8')
assert 'usage: visualize-storage' in result.stdout
result = run(['visualize-config', '-h'], capture_output=True, encoding='utf8')
assert 'usage: visualize-config' in result.stdout
assert 'Read the configuration section from a dump of a GP2040-CE board' in result.stdout
@ -66,7 +66,7 @@ def test_concatenate_invocation_json(tmpdir):
def test_storage_dump_invocation():
"""Test that a normal invocation against a dump works."""
result = run(['visualize-storage', '-P', 'tests/test-files/proto-files',
result = run(['visualize-config', '-P', 'tests/test-files/proto-files',
'--filename', 'tests/test-files/test-storage-area.bin'],
capture_output=True, encoding='utf8')
assert 'boardVersion: "v0.7.5"' in result.stdout
@ -74,7 +74,7 @@ def test_storage_dump_invocation():
def test_debug_storage_dump_invocation():
"""Test that a normal invocation against a dump works."""
result = run(['visualize-storage', '-d', '-P', 'tests/test-files/proto-files',
result = run(['visualize-config', '-d', '-P', 'tests/test-files/proto-files',
'--filename', 'tests/test-files/test-storage-area.bin'],
capture_output=True, encoding='utf8')
assert 'boardVersion: "v0.7.5"' in result.stdout
@ -83,7 +83,7 @@ def test_debug_storage_dump_invocation():
def test_storage_dump_json_invocation():
"""Test that a normal invocation against a dump works."""
result = run(['visualize-storage', '-P', 'tests/test-files/proto-files', '--json',
result = run(['visualize-config', '-P', 'tests/test-files/proto-files', '--json',
'--filename', 'tests/test-files/test-storage-area.bin'],
capture_output=True, encoding='utf8')
to_dict = json.loads(result.stdout)