[fuchsia] Move from terminal.qemu-x64 to .x64

This keeps up with the upcoming deprecation of the qemu-x64 board.

Bug: b/295036527
Change-Id: I713b38290a82b427174f0374181ac3f5f706c6c9
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/51240
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: John Wittrock <wittrock@google.com>
diff --git a/recipes/engine/femu_test.expected/femu_with_package_list.json b/recipes/engine/femu_test.expected/femu_with_package_list.json
index 9cfffe7..6f45786 100644
--- a/recipes/engine/femu_test.expected/femu_with_package_list.json
+++ b/recipes/engine/femu_test.expected/femu_with_package_list.json
@@ -1614,7 +1614,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1636,7 +1636,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1664,7 +1664,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/invalid_emulator_arch.json b/recipes/engine/femu_test.expected/invalid_emulator_arch.json
index 7c47f6a..a6964fc 100644
--- a/recipes/engine/femu_test.expected/invalid_emulator_arch.json
+++ b/recipes/engine/femu_test.expected/invalid_emulator_arch.json
@@ -1594,7 +1594,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1616,7 +1616,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1644,7 +1644,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/multiple_non_root_fars.json b/recipes/engine/femu_test.expected/multiple_non_root_fars.json
index 3fec7ed..ab0137d 100644
--- a/recipes/engine/femu_test.expected/multiple_non_root_fars.json
+++ b/recipes/engine/femu_test.expected/multiple_non_root_fars.json
@@ -1604,7 +1604,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1626,7 +1626,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1654,7 +1654,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/no_zircon_file.json b/recipes/engine/femu_test.expected/no_zircon_file.json
index 7c47f6a..a6964fc 100644
--- a/recipes/engine/femu_test.expected/no_zircon_file.json
+++ b/recipes/engine/femu_test.expected/no_zircon_file.json
@@ -1594,7 +1594,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1616,7 +1616,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1644,7 +1644,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/run_on_test_specified_arch.json b/recipes/engine/femu_test.expected/run_on_test_specified_arch.json
index 4d0548c..ebe79bb 100644
--- a/recipes/engine/femu_test.expected/run_on_test_specified_arch.json
+++ b/recipes/engine/femu_test.expected/run_on_test_specified_arch.json
@@ -1632,7 +1632,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1654,7 +1654,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1682,7 +1682,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/run_test_with_retry.json b/recipes/engine/femu_test.expected/run_test_with_retry.json
index 4523240..6a57192 100644
--- a/recipes/engine/femu_test.expected/run_test_with_retry.json
+++ b/recipes/engine/femu_test.expected/run_test_with_retry.json
@@ -1610,7 +1610,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1632,7 +1632,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1660,7 +1660,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/run_with_dart_aot_behavior.json b/recipes/engine/femu_test.expected/run_with_dart_aot_behavior.json
index b86386e..ec3f5e8 100644
--- a/recipes/engine/femu_test.expected/run_with_dart_aot_behavior.json
+++ b/recipes/engine/femu_test.expected/run_with_dart_aot_behavior.json
@@ -1607,7 +1607,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1629,7 +1629,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1657,7 +1657,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/start_femu.json b/recipes/engine/femu_test.expected/start_femu.json
index fbe2bf1..238ef5b 100644
--- a/recipes/engine/femu_test.expected/start_femu.json
+++ b/recipes/engine/femu_test.expected/start_femu.json
@@ -1606,7 +1606,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1628,7 +1628,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1656,7 +1656,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/start_femu_with_cso.json b/recipes/engine/femu_test.expected/start_femu_with_cso.json
index 404e8b9..faacfee 100644
--- a/recipes/engine/femu_test.expected/start_femu_with_cso.json
+++ b/recipes/engine/femu_test.expected/start_femu_with_cso.json
@@ -1606,7 +1606,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "ARBITRARY_SDK_VERSION",
       "--base-url",
       "gs://fuchsia/development/ARBITRARY_SDK_VERSION"
@@ -1628,7 +1628,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1656,7 +1656,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.expected/start_femu_with_override_pbm.json b/recipes/engine/femu_test.expected/start_femu_with_override_pbm.json
index 1242aeb..9fb6ef0 100644
--- a/recipes/engine/femu_test.expected/start_femu_with_override_pbm.json
+++ b/recipes/engine/femu_test.expected/start_femu_with_override_pbm.json
@@ -1585,7 +1585,7 @@
       "[CACHE]/builder/src/fuchsia/sdk/linux/tools/x64/ffx",
       "product",
       "lookup",
-      "terminal.qemu-x64",
+      "terminal.x64",
       "8776934483789347937",
       "--base-url",
       "gs://fuchsia-artifacts/development/8776934483789347937"
@@ -1607,7 +1607,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "lookup terminal.qemu-x64 product bundle"
+    "name": "lookup terminal.x64 product bundle"
   },
   {
     "cmd": [
@@ -1635,7 +1635,7 @@
         "RECIPE_REPO[depot_tools]"
       ]
     },
-    "name": "download terminal.qemu-x64 product bundle"
+    "name": "download terminal.x64 product bundle"
   },
   {
     "cmd": [
diff --git a/recipes/engine/femu_test.py b/recipes/engine/femu_test.py
index 66d3faa..5e75a5f 100644
--- a/recipes/engine/femu_test.py
+++ b/recipes/engine/femu_test.py
@@ -219,9 +219,8 @@
   emu_cmd = [ffx, '-v', 'emu', 'start', pb_path, '--headless']
   if arch == 'arm64':
     api.step(
-        'launch arm64 emulator with QEMU engine', emu_cmd + [
-            '--engine', 'qemu', '--headless', '--startup-timeout', '360'
-        ]
+        'launch arm64 emulator with QEMU engine', emu_cmd +
+        ['--engine', 'qemu', '--headless', '--startup-timeout', '360']
     )
   else:
     api.step('launch x64 emulator', emu_cmd)
@@ -240,8 +239,8 @@
   for package in suite['package_basenames']:
     api.step(
         'ffx repository publish {}'.format(package), [
-            ffx, 'repository', 'publish', pb_path, '--package-archive',
-            package, '--blob-repo-dir', ffx_blob_repo_path
+            ffx, 'repository', 'publish', pb_path, '--package-archive', package,
+            '--blob-repo-dir', ffx_blob_repo_path
         ]
     )
 
@@ -267,8 +266,7 @@
   """
   with api.step.nest('logs') as dump_step:
     dump_step.presentation.logs['target_logs'] = api.step(
-        'dump target log',
-        [ffx, 'log', 'dump'],
+        'dump target log', [ffx, 'log', 'dump'],
         stdout=api.raw_io.output_text()
     ).stdout
     dump_step.presentation.logs['ffx_daemon_log'] = api.file.read_text(
@@ -361,26 +359,31 @@
   # Fuchsia LSC runs will override the remote SDK and product bundles that
   # should be used for the tests. The path to the product bundle is passed
   # through the `gclient_variables`.
-  pb_override_path = api.properties.get('gclient_variables', {}).get('product_bundles_v2_path', None)
+  pb_override_path = api.properties.get('gclient_variables', {}
+                                       ).get('product_bundles_v2_path', None)
   if pb_override_path:
     gs_bucket = 'fuchsia-artifacts'
     with api.step.nest('parse external sdk id'):
-      sdk_id = re.search(r'^development/(?P<sdk_id>\d+)/product_bundles.json', pb_override_path).group('sdk_id')
+      sdk_id = re.search(
+          r'^development/(?P<sdk_id>\d+)/product_bundles.json', pb_override_path
+      ).group('sdk_id')
   else:
     # Read the sdk version; this is necessary to get the right product bundle
     gs_bucket = 'fuchsia'
     sdk_id = api.step(
-        'read sdk version',
-        [ffx, 'sdk', 'version'],
+        'read sdk version', [ffx, 'sdk', 'version'],
         stdout=api.raw_io.output_text()
     ).stdout.strip()
 
   # Lookup the product bundle
+  # qemu-x64 has been merged into x64, but other arches still have qemu-specific
+  # builds published.
+  product_name = 'terminal.%s' % arch if arch == 'x64' else 'terminal.qemu-%s' % arch
   product_transfer_manifest = api.step(
-      'lookup terminal.qemu-%s product bundle' % arch,
-      [ffx, 'product', 'lookup',
-       'terminal.qemu-%s' % arch, sdk_id, '--base-url',
-       'gs://%s/development/%s' % (gs_bucket, sdk_id)],
+      'lookup %s product bundle' % product_name, [
+          ffx, 'product', 'lookup', product_name, sdk_id, '--base-url',
+          'gs://%s/development/%s' % (gs_bucket, sdk_id)
+      ],
       stdout=api.raw_io.output_text()
   ).stdout.strip()
 
@@ -389,8 +392,10 @@
   # Retrieve the required product bundle and store in a temporary directory
   # Contains necessary images, packages, etc to launch the emulator
   api.step(
-      'download terminal.qemu-%s product bundle' % arch,
-      [ffx, 'product', 'download', product_transfer_manifest, local_pb, '--force']
+      'download %s product bundle' % product_name, [
+          ffx, 'product', 'download', product_transfer_manifest, local_pb,
+          '--force'
+      ]
   )
 
   # Add the product bundle's repository
@@ -467,9 +472,7 @@
                 "type": "file_system",
                 "metadata_repo_path": "/tmp/local_pb/repository",
                 "blob_repo_path": "/tmp/local_pb/blobs",
-                "aliases": [
-                    "fuchsia.com",
-                ],
+                "aliases": ["fuchsia.com",],
             },
         }]),
         retcode=0
@@ -546,7 +549,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       *fail_step_with_retries(
@@ -604,7 +607,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       *ffx_repo_list_step_data_with_retries(
@@ -663,7 +666,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       *ffx_repo_list_step_data_with_retries(
@@ -720,7 +723,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       ffx_repo_list_step_data(
@@ -833,7 +836,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       ffx_repo_list_step_data(
@@ -885,7 +888,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       ffx_repo_list_step_data(
@@ -952,7 +955,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       ffx_repo_list_step_data(
@@ -1061,7 +1064,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       *fail_step_with_retries(
@@ -1175,7 +1178,7 @@
           stdout=api.raw_io.output_text('ARBITRARY_SDK_VERSION'),
       ),
       api.step_data(
-          'lookup terminal.qemu-x64 product bundle',
+          'lookup terminal.x64 product bundle',
           stdout=api.raw_io.output_text('gs://path/to/transfer_manifest.json'),
       ),
       api.step_data(