Clean out directory in femu test recipe.

This is to prevent cached artifacts from being reused.

Change-Id: I89a1f70cb435725e1a6b130d5c4dbff1296ff7f5
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/13503
Reviewed-by: Chase Latta <chaselatta@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipes/femu_test.expected/no_zircon_file.json b/recipes/femu_test.expected/no_zircon_file.json
index a06f8fd..8d9aa03 100644
--- a/recipes/femu_test.expected/no_zircon_file.json
+++ b/recipes/femu_test.expected/no_zircon_file.json
@@ -6,6 +6,19 @@
       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
       "--json-output",
       "/path/to/tmp/json",
+      "rmtree",
+      "[CACHE]/builder/src/out"
+    ],
+    "infra_step": true,
+    "name": "Clobber build output"
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
       "ensure-directory",
       "--mode",
       "0777",
diff --git a/recipes/femu_test.expected/start_femu_with_vdl.json b/recipes/femu_test.expected/start_femu_with_vdl.json
index c4b10bd..9e08f11 100644
--- a/recipes/femu_test.expected/start_femu_with_vdl.json
+++ b/recipes/femu_test.expected/start_femu_with_vdl.json
@@ -6,6 +6,19 @@
       "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
       "--json-output",
       "/path/to/tmp/json",
+      "rmtree",
+      "[CACHE]/builder/src/out"
+    ],
+    "infra_step": true,
+    "name": "Clobber build output"
+  },
+  {
+    "cmd": [
+      "vpython",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
       "ensure-directory",
       "--mode",
       "0777",
diff --git a/recipes/femu_test.py b/recipes/femu_test.py
index 3ff0c4e..be85dde 100644
--- a/recipes/femu_test.py
+++ b/recipes/femu_test.py
@@ -266,6 +266,7 @@
 def RunSteps(api, properties, env_properties):
   cache_root = api.buildbucket.builder_cache_path
   checkout = GetCheckoutPath(api)
+  api.file.rmtree('Clobber build output', checkout.join('out'))
   api.file.ensure_directory('Ensure checkout cache', cache_root)
   api.goma.ensure()
   dart_bin = checkout.join('third_party', 'dart', 'tools', 'sdks', 'dart-sdk',