# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

[
##############################################################################
[ALWAYS, {
  # https://crbug.com/v8/7932
  'runtime/command-line-api-without-side-effects': [SKIP],

  # Require optimization, so can't be run on Lite mode.
  'cpu-profiler/coverage-block': [PASS, ['lite_mode == True', SKIP]],
  'cpu-profiler/coverage': [PASS, ['lite_mode == True', SKIP]],

  # https://crbug.com/v8/9029
  'debugger/script-on-after-compile-snapshot': [SKIP],

  # https://crbug.com/v8/10356
  # This test worked in the wasm interpreter, but fails when using Liftoff for
  # debugging.
  'debugger/wasm-externref-global': [FAIL],
}],  # ALWAYS

##############################################################################
['system == android', {
  # https://crbug.com/v8/8197
  'debugger/get-possible-breakpoints-class-fields': [SKIP],
}],  # 'system == android'

##############################################################################
['variant != default', {
  # Issue 6167.
  'debugger/eval-scopes': [PASS, FAIL],
  'debugger/scope-skip-variables-with-empty-name': [PASS, FAIL],
  'debugger/update-call-frame-scopes': [PASS, FAIL],
  'debugger/side-effect-free-debug-evaluate': [PASS, FAIL],
  'debugger/evaluate-on-call-frame-in-module': [PASS, FAIL],
}],  # variant != default

##############################################################################
['lite_mode or variant == jitless', {
  # Lite mode does not allocate feedback vector.
  'type-profiler/type-profile-start-stop': [SKIP],
  'type-profiler/type-profile': [SKIP],
  'type-profiler/type-profile-with-to-string-tag': [SKIP],
  'type-profiler/type-profile-with-classes': [SKIP],
  'type-profiler/type-profile-disable': [SKIP],

  # TODO(v8:7777): Re-enable once wasm is supported in jitless mode.
  'debugger/asm-js-stack': [SKIP],
  'debugger/asm-js-breakpoint-before-exec': [SKIP],
  'debugger/asm-js-breakpoint-during-exec': [SKIP],
  'debugger/wasm-*': [SKIP],
  'cpu-profiler/console-profile-wasm': [SKIP],
}],  # 'lite_mode or variant == jitless'

##############################################################################
['variant == jitless', {
  # https://crbug.com/v8/7777
  'cpu-profiler/coverage': [SKIP],
  'cpu-profiler/coverage-block': [SKIP],
}], # variant == jitless

##############################################################################
['(arch == arm or arch == arm64) and simulator_run', {
  # Slow tests: https://crbug.com/v8/7783
  'runtime/console-messages-limits': [PASS, NO_VARIANTS, ['mode == debug', SKIP]],
}],  # (arch == arm or arch == arm64) and simulator_run

##############################################################################
['variant == no_wasm_traps', {
  '*': [SKIP],
}],  # variant == no_wasm_traps

##############################################################################
['arch == ppc or arch == ppc64', {
  # Liftoff needs to be enabled before running these tests.
  'debugger/wasm-*': [SKIP],
}],  # 'arch == ppc or arch == ppc64'

##############################################################################
['arch == s390 or arch == s390x', {
  # Stack manipulations in LiveEdit is not implemented for this arch.
  'debugger/set-script-source-stack-padding': [SKIP],
  # Liftoff needs to be enabled before running these tests.
  'debugger/wasm-*': [SKIP],
}],  # 'arch == s390 or arch == s390x'

################################################################################
['variant == stress_snapshot', {
  '*': [SKIP],  # only relevant for mjsunit tests.
}],

##############################################################################
['tsan == True', {
  # TSan handles SIGPROF incorrectly (https://crbug.com/v8/9869).
  'cpu-profiler/console-profile-wasm': [SKIP],
}],  # 'tsan == True'

]