Lines Matching defs:reporter

44 from testdriver import reporter;
74 reporter.log('');
75 reporter.log('tdTeleportLocal1 Options:');
76 reporter.log(' --virt-modes <m1[:m2[:]]');
77 reporter.log(' Default: %s' % (':'.join(self.asVirtModesDef)));
78 reporter.log(' --cpu-counts <c1[:c2[:]]');
79 reporter.log(' Default: %s' % (':'.join(str(c) for c in self.acCpusDef)));
80 reporter.log(' --test-vms <vm1[:vm2[:...]]>');
81 reporter.log(' Test the specified VMs in the given order. Use this to change');
82 reporter.log(' the execution order or limit the choice of VMs');
83 reporter.log(' Default: %s (all)' % (':'.join(self.asTestVMsDef)));
84 reporter.log(' --skip-vms <vm1[:vm2[:...]]>');
85 reporter.log(' Skip the specified VMs when testing.');
86 reporter.log(' --tests <test1[:test2[:...]]>');
87 reporter.log(' Run the specified tests.');
88 reporter.log(' Default: %s (all)' % (':'.join(self.asTestsDef)));
89 reporter.log(' --skip-tests <test1[:test2[:...]]>');
90 reporter.log(' Skip the specified VMs when testing.');
91 reporter.log(' --quick');
92 reporter.log(' Shorthand for: --virt-modes hwvirt --cpu-counts 1');
93 reporter.log(' --test-vms tst-rhel5:tst-win2k3ent:tst-sol10');
131 reporter.log('warning: The "--skip-vms" value "%s" does not specify any of our test VMs.' % (s));
138 reporter.log('warning: The "--tests" value "%s" does not specify any of our tests.' % (s));
145 reporter.log('warning: The "--skip-tests" value "%s" does not specify any of our tests.' % (s));
379 reporter.logXcpt();
448 if reporter.testErrorCount() == 0:
454 while reporter.testErrorCount() == 0:
461 reporter.testFailure('TXS did not show up after %u min of teleporting (%u)...' \
476 reporter.testStart(sVmBaseName);
478 if cCpus == 1: reporter.testStart('1 cpu');
479 else: reporter.testStart('%u cpus' % (cCpus));
492 reporter.testStart(hsVirtModeDesc[sVirtMode]);
498 reporter.testDone();
499 reporter.testDone();
500 return reporter.testDone()[1] == 0;
543 reporter.testStart('Bad password');
555 reporter.testStart(sPassword);
559 reporter.log('src: %s' % oProgressSrc.stringifyResult());
561 reporter.testFailure('IConsole::teleport succeeded with bad password "%s"' % sPassword);
563 reporter.testFailure('IConsole::teleport returns %s instead of E_FAIL' \
566 reporter.testFailure('IConsole::teleport returns "%s" instead of "Invalid password"' \
569 reporter.testFailure('Destination completed unexpectedly after bad password "%s"' \
572 reporter.testFailure('IConsole::teleport failed with password "%s"' % sPassword);
573 if reporter.testDone()[1] != 0:
578 reporter.testFailure('reconfig failed');
579 return reporter.testDone()[1] == 0;
587 reporter.testStart('Misconfiguration & error message');
615 reporter.log('src: %s' % oProgressSrc.stringifyResult());
616 reporter.log('dst: %s' % oProgressDst.stringifyResult());
620 reporter.testFailure('The teleporation did not fail as expected');
624 reporter.testFailure('Result differs - src=%s dst=%s' \
628 reporter.testFailure('ErrorInfo::resultCode differs - src=%s dst=%s' \
632 reporter.testFailure('ErrorInfo::text differs - src="%s" dst="%s"' \
640 reporter.testFailure('reconfig #2 failed');
642 reporter.testFailure('reconfig #1 failed');
643 return reporter.testDone()[1] == 0;
650 reporter.testStart('Simple teleportation');
671 reporter.testFailure('reconfig failed');
672 return reporter.testDone()[1] == 0;
680 reporter.testStart('openRemoteSession cancel');
690 reporter.testFailure('reconfig failed');
691 return reporter.testDone()[1] == 0;
698 reporter.testStart('bad IMachine::teleporterAddress');
714 reporter.testFailure('%s' % (oProgress.stringifyResult(),));
720 reporter.testFailure('reconfig #1 failed');
721 return reporter.testDone()[1] == 0;
730 reporter.testFailureXcpt('machine.teleporterEnabled=%s' % (fEnabled,));
735 reporter.testFailureXcpt();
738 reporter.testFailure('machine.teleporterEnabled=%s but afterwards it is actually %s' % (fEnabled, fNew));
747 reporter.testFailureXcpt('machine.teleporterPassword=%s' % (sPassword,));
752 reporter.testFailureXcpt();
755 reporter.testFailure('machine.teleporterPassword="%s" but afterwards it is actually "%s"' % (sPassword, sNew));
765 except: return reporter.testFailureXcpt();
771 return reporter.testFailureXcpt('machine.teleporterPort=%u' % (uPort,));
774 return reporter.testFailureXcpt('machine.teleporterPort=%u succeeded unexpectedly' % (uPort,));
777 except: return reporter.testFailureXcpt();
780 reporter.testFailure('machine.teleporterPort=%u but afterwards it is actually %u' % (uPort, uNew));
782 reporter.testFailure('machine.teleporterPort is %u after failure, expected %u' % (uNew, uOld));
791 reporter.testFailureXcpt('machine.teleporterAddress=%s' % (sAddress,));
796 reporter.testFailureXcpt();
799 reporter.testFailure('machine.teleporterAddress="%s" but afterwards it is actually "%s"' % (sAddress, sNew));
807 reporter.testStart('IMachine::teleport*');
816 reporter.testFailureXcpt();
822 reporter.testStart('teleporterAddress');
826 reporter.testDone();
829 reporter.testStart('teleporterPort');
834 reporter.testDone();
836 reporter.testStart('teleporterPort negative');
839 reporter.testDone();
842 reporter.testStart('teleporterPassword');
847 reporter.testDone();
850 reporter.testStart('teleporterEnabled');
855 reporter.testDone();
860 reporter.testFailure('Failed to discard settings & close the session')
862 reporter.testFailure('Failed to open VM session')
864 if oVM.teleporterAddress != sOrgAddress: reporter.testFailure('Rollback failed for teleporterAddress');
865 if oVM.teleporterPort != uOrgPort: reporter.testFailure('Rollback failed for teleporterPort');
866 if oVM.teleporterPassword != sOrgPassword: reporter.testFailure('Rollback failed for teleporterPassword');
867 if oVM.teleporterEnabled != fOrgEnabled: reporter.testFailure('Rollback failed for teleporterEnabled');
869 reporter.testFailureXcpt();
870 return reporter.testDone()[1] != 0;
876 reporter.testStart(sTestName);
884 reporter.testFailure('hresult %s, expected %s' \
888 reporter.testFailure('Unexpected exception %s' % (oXcpt));
890 reporter.testFailure('Unpexected success');
893 reporter.testDone();
898 reporter.testStart('IConsole::teleport');
914 reporter.testFailure('startVm');
915 return reporter.testDone()[1] == 0;
924 reporter.testStart('Test 1');
949 reporter.testFailure('Failed to reset the VM configs')
950 return reporter.testDone()[1] == 0;