cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# -*- coding: utf-8 -*-
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncTest Manager / Suite Self Test #4 - Testing result overflow handling.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCopyright (C) 2010-2014 Oracle Corporation
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThis file is part of VirtualBox Open Source Edition (OSE), as
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncavailable from http://www.virtualbox.org. This file is free software;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncyou can redistribute it and/or modify it under the terms of the GNU
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncGeneral Public License (GPL) as published by the Free Software
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncFoundation, in version 2 as it comes in the "COPYING" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution. VirtualBox OSE is distributed in the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsynchope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncThe contents of this file may alternatively be used under the terms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncof the Common Development and Distribution License Version 1.0
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync(CDDL) only, as it comes in the "COPYING.CDDL" file of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncVirtualBox OSE distribution, in which case the provisions of the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncCDDL are applicable instead of those of the GPL.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncYou may elect to license modified versions of this file under the
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncterms and conditions of either the GPL or the CDDL or both.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Standard Python imports.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Only the main script needs to modify the path.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncg_ksValidationKitDir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# Validation Kit imports.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncfrom testdriver.base import TestDriverBase, InvalidOption;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Test Manager / Suite Self Test #4 - Testing result overflow handling.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync ## Valid tests.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync kasValidTests = [ 'immediate-sub-tests', 'total-sub-tests', 'immediate-values', 'total-values', 'immediate-messages'];
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync raise InvalidOption('Invalid test name "%s". Must be one of: %s'
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync return TestDriverBase.parseOption(self, asArgs, iArg);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Too many immediate sub-tests.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testStart('Too many immediate sub-tests (negative)');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Too many sub-tests in total.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testStart('Too many sub-tests (negative)');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # 32 * 256 = 2^(5+8) = 2^13 = 8192.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Too many immediate values.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testStart('Too many immediate values (negative)');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Too many values in total.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testStart('Too many sub-tests (negative)');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testValue('value%d' % j, i * 10000 + j, 'times');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Too many failure reasons (only immediate since the limit is extremely low).
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testStart('Too many immediate messages (negative)');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testStart('Unknown test %s' % (self.sOptWhich,));