Don't run art tests when executing desugared library tests

Since they don't require library desugaring, they don't provide
much value

Bug: b/234403764
Change-Id: Id17d7cb7075d73fcf18f1e733d73f30a3ddaf18c
diff --git a/tools/test.py b/tools/test.py
index 27c07de..570da44 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -134,6 +134,9 @@
   result.add_option('--no-r8lib', '--no_r8lib',
       default=False, action='store_true',
       help='Run the tests on R8 full with relocated dependencies.')
+  result.add_option('--no-arttests', '--no_arttests',
+      default=False, action='store_true',
+      help='Do not run the art tests.')
   result.add_option('--r8lib-no-deps', '--r8lib_no_deps',
       default=False, action='store_true',
       help='Run the tests on r8lib without relocated dependencies.')
@@ -345,6 +348,8 @@
     gradle_args.append('-Pdesugar_jdk_json_dir=' + desugar_jdk_json_dir)
   if desugar_jdk_libs:
     gradle_args.append('-Pdesugar_jdk_libs=' + desugar_jdk_libs)
+  if options.no_arttests:
+    gradle_args.append('-Pno_arttests=true')
   if options.reset_testing_state:
     gradle_args.append('-Ptesting-state')
     gradle_args.append('-Preset-testing-state')