[infra] Move SKQP recipe test to correct recipe

Followup from https://skia-review.googlesource.com/c/skia/+/228556

Change-Id: Iee0d2c7e095dd9e918c6801f2b3692d829f8557a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228566
Reviewed-by: Ben Wagner aka dogben <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
diff --git a/infra/bots/recipes/compile.py b/infra/bots/recipes/compile.py
index eee5863..81da2eb 100644
--- a/infra/bots/recipes/compile.py
+++ b/infra/bots/recipes/compile.py
@@ -35,10 +35,6 @@
     # TODO(borenet): Move this out of the try/finally.
     dst = api.vars.swarming_out_dir
     api.build.copy_build_products(out_dir=out_dir, dst=dst)
-    if 'SKQP' in api.vars.extra_tokens:
-      wlist = checkout_root.join(
-          'skia', 'infra','cts', 'whitelist_devices.json')
-      api.file.copy('copy whitelist', wlist, dst)
   finally:
     if 'Win' in api.vars.builder_cfg.get('os', ''):
       api.python.inline(
@@ -57,7 +53,6 @@
 
 
 TEST_BUILDERS = [
-  'Build-Debian9-Clang-universal-devrel-Android_SKQP',
   'Build-Win-Clang-x86-Debug',
 ]
 
diff --git a/infra/bots/recipes/compile.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json b/infra/bots/recipes/sync_and_compile.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
similarity index 63%
rename from infra/bots/recipes/compile.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
rename to infra/bots/recipes/sync_and_compile.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
index b247395..4b1b256 100644
--- a/infra/bots/recipes/compile.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
+++ b/infra/bots/recipes/sync_and_compile.expected/Build-Debian9-Clang-universal-devrel-Android_SKQP.json
@@ -9,6 +9,115 @@
       "ensure-directory",
       "--mode",
       "0777",
+      "[START_DIR]/cache/work"
+    ],
+    "infra_step": true,
+    "name": "makedirs checkout_path"
+  },
+  {
+    "cmd": [
+      "python",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "remove",
+      "[START_DIR]/cache/work/.gclient_entries"
+    ],
+    "infra_step": true,
+    "name": "remove [START_DIR]/cache/work/.gclient_entries"
+  },
+  {
+    "cmd": [
+      "python",
+      "-u",
+      "RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
+      "--spec-path",
+      "cache_dir = '[START_DIR]/cache/git'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': False, 'name': 'skia', 'url': 'https://skia.googlesource.com/skia.git'}]",
+      "--patch_root",
+      "skia",
+      "--revision_mapping_file",
+      "{\"got_revision\": \"skia\"}",
+      "--git-cache-dir",
+      "[START_DIR]/cache/git",
+      "--cleanup-dir",
+      "[CLEANUP]/bot_update",
+      "--output_json",
+      "/path/to/tmp/json",
+      "--revision",
+      "skia@abc123"
+    ],
+    "cwd": "[START_DIR]/cache/work",
+    "env_prefixes": {
+      "PATH": [
+        "RECIPE_REPO[depot_tools]"
+      ]
+    },
+    "infra_step": true,
+    "name": "bot_update",
+    "~followup_annotations": [
+      "@@@STEP_TEXT@Some step text@@@",
+      "@@@STEP_LOG_LINE@json.output@{@@@",
+      "@@@STEP_LOG_LINE@json.output@  \"did_run\": true, @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"fixed_revisions\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@    \"skia\": \"abc123\"@@@",
+      "@@@STEP_LOG_LINE@json.output@  }, @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"manifest\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@    \"skia\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"repository\": \"https://fake.org/skia.git\", @@@",
+      "@@@STEP_LOG_LINE@json.output@      \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
+      "@@@STEP_LOG_LINE@json.output@    }@@@",
+      "@@@STEP_LOG_LINE@json.output@  }, @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"patch_failure\": false, @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"patch_root\": \"skia\", @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"properties\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@    \"got_revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\", @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"got_revision_cp\": \"refs/heads/master@{#164710}\"@@@",
+      "@@@STEP_LOG_LINE@json.output@  }, @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"root\": \"skia\", @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"source_manifest\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@    \"directories\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@      \"skia\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@        \"git_checkout\": {@@@",
+      "@@@STEP_LOG_LINE@json.output@          \"repo_url\": \"https://fake.org/skia.git\", @@@",
+      "@@@STEP_LOG_LINE@json.output@          \"revision\": \"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
+      "@@@STEP_LOG_LINE@json.output@        }@@@",
+      "@@@STEP_LOG_LINE@json.output@      }@@@",
+      "@@@STEP_LOG_LINE@json.output@    }, @@@",
+      "@@@STEP_LOG_LINE@json.output@    \"version\": 0@@@",
+      "@@@STEP_LOG_LINE@json.output@  }, @@@",
+      "@@@STEP_LOG_LINE@json.output@  \"step_text\": \"Some step text\"@@@",
+      "@@@STEP_LOG_LINE@json.output@}@@@",
+      "@@@STEP_LOG_END@json.output@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision@\"9046e2e693bb92a76e972b694580e5d17ad10748\"@@@",
+      "@@@SET_BUILD_PROPERTY@got_revision_cp@\"refs/heads/master@{#164710}\"@@@"
+    ]
+  },
+  {
+    "cmd": [
+      "python",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "ensure-directory",
+      "--mode",
+      "0777",
+      "[START_DIR]/tmp"
+    ],
+    "infra_step": true,
+    "name": "makedirs tmp_dir"
+  },
+  {
+    "cmd": [
+      "python",
+      "-u",
+      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
+      "--json-output",
+      "/path/to/tmp/json",
+      "ensure-directory",
+      "--mode",
+      "0777",
       "[START_DIR]/cache/docker/skqp"
     ],
     "infra_step": true,
@@ -22,7 +131,7 @@
       "--workdir",
       "/SRC/skia/infra/skqp",
       "--volume",
-      "[START_DIR]:/SRC",
+      "[START_DIR]/cache/work:/SRC",
       "--volume",
       "[START_DIR]/cache/docker/skqp:/OUT",
       "gcr.io/skia-public/android-skqp:r20_v1",
@@ -122,7 +231,7 @@
       "--json-output",
       "/path/to/tmp/json",
       "copy",
-      "[START_DIR]/skia/infra/cts/whitelist_devices.json",
+      "[START_DIR]/cache/work/skia/infra/cts/whitelist_devices.json",
       "[START_DIR]/[SWARM_OUT_DIR]"
     ],
     "infra_step": true,
diff --git a/infra/bots/recipes/sync_and_compile.py b/infra/bots/recipes/sync_and_compile.py
index 128e40c..fb3d81e 100644
--- a/infra/bots/recipes/sync_and_compile.py
+++ b/infra/bots/recipes/sync_and_compile.py
@@ -71,6 +71,10 @@
     if 'ParentRevision' in api.vars.builder_name:
       dst = api.vars.swarming_out_dir.join('ParentRevision')
     api.build.copy_build_products(out_dir=out_dir, dst=dst)
+    if 'SKQP' in api.vars.extra_tokens:
+      wlist = checkout_root.join(
+          'skia', 'infra','cts', 'whitelist_devices.json')
+      api.file.copy('copy whitelist', wlist, dst)
   finally:
     if 'Win' in api.vars.builder_cfg.get('os', ''):
       api.python.inline(
@@ -89,6 +93,7 @@
 
 
 TEST_BUILDERS = [
+  'Build-Debian9-Clang-universal-devrel-Android_SKQP',
   'Build-Debian9-Clang-x86_64-Release-ParentRevision',
   'Build-Debian9-GCC-x86_64-Release-Flutter_Android',
   'Build-Mac-Clang-x86_64-Debug-CommandBuffer',