From e0f5f8fb5a5a82814d66a9c9c1aa296b0e121a39 Mon Sep 17 00:00:00 2001 From: "Brian S. Stephan" Date: Mon, 8 Apr 2024 14:30:43 -0500 Subject: [PATCH] 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 --- gp2040ce_bintools/builder.py | 4 ++-- tests/test_commands.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gp2040ce_bintools/builder.py b/gp2040ce_bintools/builder.py index 11985e2..540381b 100644 --- a/gp2040ce_bintools/builder.py +++ b/gp2040ce_bintools/builder.py @@ -274,7 +274,7 @@ def concatenate(): 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.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() concatenate_firmware_and_storage_files(args.firmware_filename, @@ -282,7 +282,7 @@ def concatenate(): json_board_config_filename=args.json_board_config_filename, binary_user_config_filename=args.binary_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) diff --git a/tests/test_commands.py b/tests/test_commands.py index fe3b05e..bdd8047 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -44,7 +44,7 @@ def test_concatenate_invocation(tmpdir): """Test that a normal invocation against a dump works.""" out_filename = os.path.join(tmpdir, 'out.bin') _ = 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: out = out_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.""" out_filename = os.path.join(tmpdir, 'out.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]) with open(out_filename, 'rb') as out_file, open('tests/test-files/test-binary-source-of-json-config.bin', 'rb') as storage_file: