Add Correctness tests for CanvasKit

Also make a CPU only and GPU only build (although
the latter still has a lot of CPU logic).

Bug: skia:
Change-Id: I857c2300021c2adb5344865c28e4ad3e8d332954
Reviewed-on: https://skia-review.googlesource.com/c/162022
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/infra/bots/recipes/test_pathkit.py b/infra/bots/recipes/test_pathkit.py
index 6bfd687..2d3ba87 100644
--- a/infra/bots/recipes/test_pathkit.py
+++ b/infra/bots/recipes/test_pathkit.py
@@ -17,7 +17,7 @@
 ]
 
 
-DOCKER_IMAGE = 'gcr.io/skia-public/gold-karma-chrome-tests:68.0.3440.106_v5'
+DOCKER_IMAGE = 'gcr.io/skia-public/gold-karma-chrome-tests:68.0.3440.106_v6'
 INNER_KARMA_SCRIPT = '/SRC/skia/infra/pathkit/test_pathkit.sh'
 
 
@@ -33,10 +33,10 @@
   # The karma script is configured to look in ./npm-(asmjs|wasm)/bin/test/ for
   # the test files to load, so we must copy them there (see Set up for docker).
   copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
-                        'npm-wasm', 'bin', 'test')
+                                 'npm-wasm', 'bin', 'test')
   if 'asmjs' in api.vars.builder_name:
     copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
-                        'npm-asmjs', 'bin', 'test')
+                                   'npm-asmjs', 'bin', 'test')
 
   base_dir = api.vars.build_dir
   bundle_name = 'pathkit.wasm'
@@ -75,7 +75,7 @@
     raise
 
 # Copy binaries (pathkit.js and pathkit.wasm) to where the karma tests
-# expect them ($SKIA_ROOT/modules/pathkit/npm-wasm/test/)
+# expect them ($SKIA_ROOT/modules/pathkit/npm-wasm/bin/test/)
 dest = os.path.join(copy_dest, 'pathkit.js')
 shutil.copyfile(os.path.join(base_dir, 'pathkit.js'), dest)
 os.chmod(dest, 0o644) # important, otherwise non-privileged docker can't read.
@@ -93,24 +93,25 @@
       infra_step=True)
 
 
-
   cmd = ['docker', 'run', '--shm-size=2gb', '--rm',
-         '-v', '%s:/SRC' % checkout_root, '-v', '%s:/OUT' % out_dir]
+         '--volume', '%s:/SRC' % checkout_root,
+         '--volume', '%s:/OUT' % out_dir]
 
   if 'asmjs' in api.vars.builder_name:
-    cmd.extend(['-e', 'ASM_JS=1'])  # -e sets environment variables
+    cmd.extend(['--env', 'ASM_JS=1'])
 
   cmd.extend([
-         DOCKER_IMAGE,             INNER_KARMA_SCRIPT,
-         '--builder',              api.vars.builder_name,
-         '--git_hash',             api.properties['revision'],
-         '--buildbucket_build_id', api.properties.get('buildbucket_build_id',
-                                                      ''),
-         '--bot_id',               api.vars.swarming_bot_id,
-         '--task_id',              api.vars.swarming_task_id,
-         '--browser',              'Chrome',
-         '--config',               api.vars.configuration,
-         ])
+      DOCKER_IMAGE,             INNER_KARMA_SCRIPT,
+      '--builder',              api.vars.builder_name,
+      '--git_hash',             api.properties['revision'],
+      '--buildbucket_build_id', api.properties.get('buildbucket_build_id',
+                                                  ''),
+      '--bot_id',               api.vars.swarming_bot_id,
+      '--task_id',              api.vars.swarming_task_id,
+      '--browser',              'Chrome',
+      '--config',               api.vars.configuration,
+      '--source_type',          'pathkit',
+      ])
 
   if 'asmjs' in api.vars.builder_name:
     cmd.extend(['--compiled_language', 'asmjs']) # the default is wasm