test_that: Rename whitelist-chrome-crashes

Per go/COIL, test_that's --whitelist-chrome-crashes param is being
renamed to --allow-chrome-crashes.
This CL updates the chromite code which uses that param.

Uploaded with --no-verify because repo upload was complaining about
irrelevant pytest issues (no attribute 'importorskip').

BUG=b:159917945
TEST=run_pytest

Cq-Depend: chromium:2385861
Change-Id: Ib70cafb4c79f79589a5557c024f2073634c042c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2385864
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Greg Edelston <gredelston@google.com>
diff --git a/api/controller/test.py b/api/controller/test.py
index 87087da..dfe6045 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -208,7 +208,7 @@
   # TODO(evanhernandez): Find a nice way to pass test_that-args through
   # the build API. Or obviate them.
   if test_harness == test_pb2.VmTestRequest.AUTOTEST:
-    cmd.append('--test_that-args=--whitelist-chrome-crashes')
+    cmd.append('--test_that-args=--allow-chrome-crashes')
 
   with osutils.TempDir(prefix='vm-test-results.') as results_dir:
     cmd.extend(['--results-dir', results_dir])
diff --git a/api/controller/test_unittest.py b/api/controller/test_unittest.py
index d018e50..ca3f3c2 100644
--- a/api/controller/test_unittest.py
+++ b/api/controller/test_unittest.py
@@ -502,7 +502,7 @@
         '--autotest', 'suite',
         '--ssh-port', '1234',
         '--private-key', '/path/to/id_rsa',
-        '--test_that-args=--whitelist-chrome-crashes',
+        '--test_that-args=--allow-chrome-crashes',
     ])
 
   def testMissingBuildTarget(self):
diff --git a/cbuildbot/stages/vm_test_stages.py b/cbuildbot/stages/vm_test_stages.py
index d27dfce..94feddf 100644
--- a/cbuildbot/stages/vm_test_stages.py
+++ b/cbuildbot/stages/vm_test_stages.py
@@ -254,7 +254,7 @@
           image_path,
           os.path.join(test_results_dir, 'test_harness'),
           test_config=test_config,
-          whitelist_chrome_crashes=self._chrome_rev is None,
+          allow_chrome_crashes=self._chrome_rev is None,
           ssh_private_key=ssh_private_key,
           ssh_port=self._ssh_port)
 
@@ -377,7 +377,7 @@
         image_path,
         os.path.join(test_results_dir, 'test_harness'),
         test_config=test_config,
-        whitelist_chrome_crashes=self._chrome_rev is None,
+        allow_chrome_crashes=self._chrome_rev is None,
         ssh_private_key=ssh_private_key,
         ssh_port=self._ssh_port)
 
@@ -782,18 +782,18 @@
                  image_path,
                  results_dir,
                  test_config,
-                 whitelist_chrome_crashes,
+                 allow_chrome_crashes,
                  ssh_private_key=None,
                  ssh_port=9228):
   """Runs the test harness suite."""
   if (test_config.use_ctest or
       test_config.test_type != constants.VM_SUITE_TEST_TYPE):
     _RunTestSuiteUsingCtest(buildroot, board, image_path, results_dir,
-                            test_config, whitelist_chrome_crashes,
+                            test_config, allow_chrome_crashes,
                             ssh_private_key, ssh_port)
   else:
     _RunTestSuiteUsingChromite(board, image_path, results_dir, test_config,
-                               whitelist_chrome_crashes, ssh_private_key,
+                               allow_chrome_crashes, ssh_private_key,
                                ssh_port)
 
 
@@ -803,7 +803,7 @@
                                image_path,
                                results_dir,
                                test_config,
-                               whitelist_chrome_crashes,
+                               allow_chrome_crashes,
                                ssh_private_key=None,
                                ssh_port=9228):
   """Runs the test harness suite using the chromite code path."""
@@ -820,8 +820,8 @@
       '--results-dir=%s' % results_dir,
   ]
 
-  if whitelist_chrome_crashes:
-    cmd.append('--test_that-args=--whitelist-chrome-crashes')
+  if allow_chrome_crashes:
+    cmd.append('--test_that-args=--allow-chrome-crashes')
 
   if ssh_private_key is not None:
     cmd.append('--private-key=%s' % path_util.ToChrootPath(ssh_private_key))
@@ -847,7 +847,7 @@
                             image_path,
                             results_dir,
                             test_config,
-                            whitelist_chrome_crashes,
+                            allow_chrome_crashes,
                             ssh_private_key=None,
                             ssh_port=9228):
   """Runs the test harness suite using the ctest code path."""
@@ -879,8 +879,8 @@
 
   cmd.append('--test_prefix=SimpleTestVerify')
 
-  if whitelist_chrome_crashes:
-    cmd.append('--whitelist_chrome_crashes')
+  if allow_chrome_crashes:
+    cmd.append('--allow_chrome_crashes')
 
   if ssh_private_key is not None:
     cmd.append('--ssh_private_key=%s' % ssh_private_key)
diff --git a/cbuildbot/stages/vm_test_stages_unittest.py b/cbuildbot/stages/vm_test_stages_unittest.py
index aa3c214..a9b3a07 100644
--- a/cbuildbot/stages/vm_test_stages_unittest.py
+++ b/cbuildbot/stages/vm_test_stages_unittest.py
@@ -416,13 +416,13 @@
                             constants.CHROOT_SOURCE_ROOT, path)
     )
 
-  def _RunTestSuite(self, test_config, whitelist_chrome_crashes=False):
+  def _RunTestSuite(self, test_config, allow_chrome_crashes=False):
     vm_test_stages.RunTestSuite(
         self.BUILD_ROOT,
         self.TEST_BOARD,
         self.TEST_IMAGE_OUTSIDE_CHROOT,
         self.RESULTS_DIR,
-        whitelist_chrome_crashes=whitelist_chrome_crashes,
+        allow_chrome_crashes=allow_chrome_crashes,
         test_config=test_config,
         ssh_private_key=self.PRIVATE_KEY_OUTSIDE_CHROOT,
         ssh_port=self.SSH_PORT)
@@ -484,16 +484,16 @@
         constants.VM_SUITE_TEST_TYPE, test_suite='smoke', use_ctest=False)
     self._RunTestSuite(config)
     self.assertCommandContains(['--autotest=suite:smoke'])
-    self.assertCommandContains(['---test_that-args=-whitelist_chrome_crashes'],
+    self.assertCommandContains(['---test_that-args=-allow_chrome_crashes'],
                                expected=False)
 
   def testWhitelistChromeCrashes(self):
-    """Test SMOKE config with whitelisting chrome crashes."""
+    """Test SMOKE config with allowing chrome crashes."""
     config = config_lib.VMTestConfig(
         constants.VM_SUITE_TEST_TYPE, test_suite='smoke', use_ctest=False)
-    self._RunTestSuite(config, whitelist_chrome_crashes=True)
+    self._RunTestSuite(config, allow_chrome_crashes=True)
     self.assertCommandContains(['--autotest=suite:smoke'])
-    self.assertCommandContains(['--test_that-args=--whitelist-chrome-crashes'])
+    self.assertCommandContains(['--test_that-args=--allow-chrome-crashes'])
 
 
 class UnmockedTests(cros_test_lib.TempDirTestCase):
diff --git a/lib/cros_test_unittest.py b/lib/cros_test_unittest.py
index cfbd515..93b305b 100644
--- a/lib/cros_test_unittest.py
+++ b/lib/cros_test_unittest.py
@@ -302,7 +302,7 @@
     self._tester._device.ssh_port = None
     self._tester._device.device = '100.90.29.199'
     self._tester.test_that_args = ['--test_that-args',
-                                   '--whitelist-chrome-crashes']
+                                   '--allow-chrome-crashes']
 
     cwd = os.path.join('/mnt/host/source',
                        os.path.relpath(os.getcwd(), constants.SOURCE_ROOT))
@@ -314,7 +314,7 @@
     self.assertCommandCalled(
         ['test_that', '--board', 'amd64-generic', '--results_dir',
          test_results_dir, '--ssh_private_key', testing_rsa_dir, '--debug',
-         '--whitelist-chrome-crashes', '--no-quickmerge', '--ssh_options',
+         '--allow-chrome-crashes', '--no-quickmerge', '--ssh_options',
          '-F /dev/null -i /dev/null', '100.90.29.199', 'accessibility_Sanity'],
         dryrun=False, enter_chroot=True)