Delete vs_build temp logs folder.

Ensure logs collected during the installation of vs_build are eliminated
after they are reported to luci.

Bug: https://github.com/flutter/flutter/issues/143948
Change-Id: Icce888d023dfd9fdcdd529124c2b20369df361f4
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/55460
Reviewed-by: Keyong Han <keyonghan@google.com>
Reviewed-by: Yusuf Mohsinally <mohsinally@google.com>
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipe_modules/flutter_deps/api.py b/recipe_modules/flutter_deps/api.py
index 6301372..a6b0dbe 100644
--- a/recipe_modules/flutter_deps/api.py
+++ b/recipe_modules/flutter_deps/api.py
@@ -652,6 +652,7 @@
           for log in logs:
             log_name = self.m.path.basename(log)
             presentation.logs[log_name] = self.m.file.read_text(log_name, log)
+          self.m.file.rmtree('Remove logs tmp folder', logs_path)
 
         deferred.append(self.m.defer(collect_logs))
       self.m.defer.collect(deferred)
diff --git a/recipe_modules/flutter_deps/examples/full.expected/windows_vs_not_installed.json b/recipe_modules/flutter_deps/examples/full.expected/windows_vs_not_installed.json
index c4e4ea5..b7d9596 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/windows_vs_not_installed.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/windows_vs_not_installed.json
@@ -1357,6 +1357,61 @@
     ]
   },
   {
+    "cmd": [
+      "vpython3",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]\\resources\\fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "rmtree",
+      "[CLEANUP]\\tmp_tmp_7"
+    ],
+    "cwd": "[CACHE]\\vsbuild",
+    "env": {
+      "ANDROID_HOME": "[CACHE]\\android",
+      "ANDROID_NDK_PATH": "[CACHE]\\android\\ndk-bundle",
+      "ANDROID_SDK_HOME": "[CLEANUP]\\tmp_tmp_2",
+      "ANDROID_SDK_ROOT": "[CACHE]\\android",
+      "ANDROID_USER_HOME": "[CLEANUP]\\tmp_tmp_2\\.android",
+      "CHROME_EXECUTABLE": "[CACHE]\\chrome\\chrome\\chrome.exe",
+      "CHROME_NO_SANDBOX": "true",
+      "FIREFOX_EXECUTABLE": "[CACHE]\\firefox\\firefox",
+      "FLUTTER_XCODE_CODE_SIGN_STYLE": "Manual",
+      "FLUTTER_XCODE_DEVELOPMENT_TEAM": "S8QB4VV633",
+      "FLUTTER_XCODE_PROVISIONING_PROFILE_SPECIFIER": "match Development *",
+      "GOPATH": "[CLEANUP]\\go_path",
+      "GRADLE_OPTS": "-Dorg.gradle.daemon=false",
+      "GRADLE_USER_HOME": "[CACHE]\\gradle"
+    },
+    "env_prefixes": {
+      "PATH": [
+        "[CACHE]\\vsbuild",
+        "[CACHE]\\certs",
+        "[CACHE]\\dart_sdk",
+        "[CACHE]\\chrome\\chrome",
+        "[CACHE]\\chrome\\drivers",
+        "[CACHE]\\firefox",
+        "[CACHE]\\go\\bin",
+        "[CLEANUP]\\go_path\\bin",
+        "[CACHE]\\go\\bin",
+        "[CLEANUP]\\go_path\\bin",
+        "[START_DIR]\\firebase",
+        "[CACHE]\\cmake\\bin",
+        "[CLEANUP]\\tmp_tmp_3",
+        "[CACHE]\\cosign\\bin",
+        "[CACHE]\\ninja",
+        "[CACHE]\\clang\\bin",
+        "[CLEANUP]\\tmp_tmp_5\\curl",
+        "[CLEANUP]\\tmp_tmp_6\\doxygen\\bin"
+      ]
+    },
+    "infra_step": true,
+    "name": "VSBuild.Remove logs tmp folder",
+    "~followup_annotations": [
+      "@@@STEP_NEST_LEVEL@1@@@"
+    ]
+  },
+  {
     "cmd": [],
     "name": "Install ruby"
   },