tdSelfTest2.py revision cf22150eaeeb72431bf1cf65c309a431454fb22b
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync# -*- coding: utf-8 -*-
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncTest Manager / Suite Self Test #2 - Everything should succeed.
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.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync Test Manager / Suite Self Test #2 - Everything should succeed.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testValue('value-name1', 123456789, 'ms');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.testValue('value-name2', 11223344, 'times');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # No spaces in XML.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<?xml version="1.0" encoding="UTF-8" ?>');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<Test timestamp="%s" name="foobar1">' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<Test timestamp="%s" name="sub1">' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<Passed timestamp="%s"/>' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<End timestamp="%s" errors="0"/>' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Spaces + funny line endings.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<?xml version="1.0" encoding="UTF-8" ?>\r\n');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<Test timestamp="%s" name="foobar2">\n\n\t\n\r\n' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write('<Test timestamp="%s" name="sub2">' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write(' <Passed timestamp="%s"/>\n' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync oSubXmlFile.write(' <End timestamp="%s" errors="0"/>\r' % (utils.getIsoTimestamp(),));
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # A few long log times for WUI log testing.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('long line: asdfasdfljkasdlfkjasldkfjlaksdfjl asdlfkjasdlkfjalskdfjlaksdjfa falkjaldkjfalskdjflaksdjf ' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'lajksdflkjasdlfkjalsdfj asldfkjlaskdjflaksdjflaksdjflkj asdlfkjalsdkfjalsdkjflaksdj fasdlfkj ' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'asdlkfj aljkasdflkj alkjdsf lakjsdf');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('long line: asdfasdfljkasdlfkjasldkfjlaksdfjl asdlfkjasdlkfjalskdfjlaksdjfa falkjaldkjfalskdjflaksdjf ' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'lajksdflkjasdlfkjalsdfj asldfkjlaskdjflaksdjflaksdjflkj asdlfkjalsdkfjalsdkjflaksdj fasdlfkj ' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'asdlkfj aljkasdflkj alkjdsf lakjsdf');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync reporter.log('long line: asdfasdfljkasdlfkjasldkfjlaksdfjl asdlfkjasdlkfjalskdfjlaksdjfa falkjaldkjfalskdjflaksdjf ' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'lajksdflkjasdlfkjalsdfj asldfkjlaskdjflaksdjflaksdjflkj asdlfkjalsdkfjalsdkjflaksdj fasdlfkj ' \
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync 'asdlkfj aljkasdflkj alkjdsf lakjsdf');
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync # Upload a file.