rename output file argument to concatenate
to reduce confusion, now that this supports UF2 output, it's not necessarily a new *binary* file Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
parent
0789dd8c9d
commit
e0f5f8fb5a
|
@ -274,7 +274,7 @@ def concatenate():
|
||||||
user_config_group.add_argument('--json-user-config-filename', help=".json file of a GP2040-CE user config")
|
user_config_group.add_argument('--json-user-config-filename', help=".json file of a GP2040-CE user config")
|
||||||
output_group = parser.add_mutually_exclusive_group(required=True)
|
output_group = parser.add_mutually_exclusive_group(required=True)
|
||||||
output_group.add_argument('--usb', action='store_true', help="write the resulting firmware + storage to USB")
|
output_group.add_argument('--usb', action='store_true', help="write the resulting firmware + storage to USB")
|
||||||
output_group.add_argument('--new-binary-filename', help="output .bin file of the resulting firmware + storage")
|
output_group.add_argument('--new-filename', help="output .bin or .uf2 file of the resulting firmware + storage")
|
||||||
|
|
||||||
args, _ = parser.parse_known_args()
|
args, _ = parser.parse_known_args()
|
||||||
concatenate_firmware_and_storage_files(args.firmware_filename,
|
concatenate_firmware_and_storage_files(args.firmware_filename,
|
||||||
|
@ -282,7 +282,7 @@ def concatenate():
|
||||||
json_board_config_filename=args.json_board_config_filename,
|
json_board_config_filename=args.json_board_config_filename,
|
||||||
binary_user_config_filename=args.binary_user_config_filename,
|
binary_user_config_filename=args.binary_user_config_filename,
|
||||||
json_user_config_filename=args.json_user_config_filename,
|
json_user_config_filename=args.json_user_config_filename,
|
||||||
combined_filename=args.new_binary_filename, usb=args.usb,
|
combined_filename=args.new_filename, usb=args.usb,
|
||||||
replace_extra=args.replace_extra)
|
replace_extra=args.replace_extra)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ def test_concatenate_invocation(tmpdir):
|
||||||
"""Test that a normal invocation against a dump works."""
|
"""Test that a normal invocation against a dump works."""
|
||||||
out_filename = os.path.join(tmpdir, 'out.bin')
|
out_filename = os.path.join(tmpdir, 'out.bin')
|
||||||
_ = run(['concatenate', 'tests/test-files/test-firmware.bin', '--binary-user-config-filename',
|
_ = run(['concatenate', 'tests/test-files/test-firmware.bin', '--binary-user-config-filename',
|
||||||
'tests/test-files/test-storage-area.bin', '--new-binary-filename', out_filename])
|
'tests/test-files/test-storage-area.bin', '--new-filename', out_filename])
|
||||||
with open(out_filename, 'rb') as out_file, open('tests/test-files/test-storage-area.bin', 'rb') as storage_file:
|
with open(out_filename, 'rb') as out_file, open('tests/test-files/test-storage-area.bin', 'rb') as storage_file:
|
||||||
out = out_file.read()
|
out = out_file.read()
|
||||||
storage = storage_file.read()
|
storage = storage_file.read()
|
||||||
|
@ -55,7 +55,7 @@ def test_concatenate_invocation_json(tmpdir):
|
||||||
"""Test that a normal invocation with a firmware and a JSON file works."""
|
"""Test that a normal invocation with a firmware and a JSON file works."""
|
||||||
out_filename = os.path.join(tmpdir, 'out.bin')
|
out_filename = os.path.join(tmpdir, 'out.bin')
|
||||||
_ = run(['concatenate', '-P', 'tests/test-files/proto-files', 'tests/test-files/test-firmware.bin',
|
_ = run(['concatenate', '-P', 'tests/test-files/proto-files', 'tests/test-files/test-firmware.bin',
|
||||||
'--json-user-config-filename', 'tests/test-files/test-config.json', '--new-binary-filename',
|
'--json-user-config-filename', 'tests/test-files/test-config.json', '--new-filename',
|
||||||
out_filename])
|
out_filename])
|
||||||
with open(out_filename, 'rb') as out_file, open('tests/test-files/test-binary-source-of-json-config.bin',
|
with open(out_filename, 'rb') as out_file, open('tests/test-files/test-binary-source-of-json-config.bin',
|
||||||
'rb') as storage_file:
|
'rb') as storage_file:
|
||||||
|
|
Loading…
Reference in New Issue