11cb0ef41Sopenharmony_ci# Copyright 2018 the V8 project authors. All rights reserved.
21cb0ef41Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be
31cb0ef41Sopenharmony_ci# found in the LICENSE file.
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciimport random
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_cifrom .utils import random_utils
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ciclass TestConfig(object):
111cb0ef41Sopenharmony_ci  def __init__(self,
121cb0ef41Sopenharmony_ci               command_prefix,
131cb0ef41Sopenharmony_ci               extra_flags,
141cb0ef41Sopenharmony_ci               isolates,
151cb0ef41Sopenharmony_ci               mode_flags,
161cb0ef41Sopenharmony_ci               no_harness,
171cb0ef41Sopenharmony_ci               noi18n,
181cb0ef41Sopenharmony_ci               random_seed,
191cb0ef41Sopenharmony_ci               run_skipped,
201cb0ef41Sopenharmony_ci               shell_dir,
211cb0ef41Sopenharmony_ci               timeout,
221cb0ef41Sopenharmony_ci               verbose,
231cb0ef41Sopenharmony_ci               regenerate_expected_files=False):
241cb0ef41Sopenharmony_ci    self.command_prefix = command_prefix
251cb0ef41Sopenharmony_ci    self.extra_flags = extra_flags
261cb0ef41Sopenharmony_ci    self.isolates = isolates
271cb0ef41Sopenharmony_ci    self.mode_flags = mode_flags
281cb0ef41Sopenharmony_ci    self.no_harness = no_harness
291cb0ef41Sopenharmony_ci    self.noi18n = noi18n
301cb0ef41Sopenharmony_ci    # random_seed is always not None.
311cb0ef41Sopenharmony_ci    self.random_seed = random_seed or random_utils.random_seed()
321cb0ef41Sopenharmony_ci    self.run_skipped = run_skipped
331cb0ef41Sopenharmony_ci    self.shell_dir = shell_dir
341cb0ef41Sopenharmony_ci    self.timeout = timeout
351cb0ef41Sopenharmony_ci    self.verbose = verbose
361cb0ef41Sopenharmony_ci    self.regenerate_expected_files = regenerate_expected_files
37