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_cifrom . import base 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_cidef _is_failure_output(self, output): 91cb0ef41Sopenharmony_ci return ( 101cb0ef41Sopenharmony_ci output.exit_code != 0 or 111cb0ef41Sopenharmony_ci 'FAILED!' in output.stdout 121cb0ef41Sopenharmony_ci ) 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciclass OutProc(base.OutProc): 161cb0ef41Sopenharmony_ci """Optimized for positive tests.""" 171cb0ef41Sopenharmony_ciOutProc._is_failure_output = _is_failure_output 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ciclass PassOutProc(base.PassOutProc): 211cb0ef41Sopenharmony_ci """Optimized for positive tests expected to PASS.""" 221cb0ef41Sopenharmony_ciPassOutProc._is_failure_output = _is_failure_output 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_ci 251cb0ef41Sopenharmony_ciclass NegOutProc(base.Negative, OutProc): 261cb0ef41Sopenharmony_ci pass 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ciclass NegPassOutProc(base.Negative, PassOutProc): 291cb0ef41Sopenharmony_ci pass 301cb0ef41Sopenharmony_ci 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ciMOZILLA_PASS_DEFAULT = PassOutProc() 331cb0ef41Sopenharmony_ciMOZILLA_PASS_NEGATIVE = NegPassOutProc() 34