internal TestContext(TestLogger logger, int instance, bool validateTestAttributes, ICommandCallbacks callbacks = null) { Logger = logger; Instance = instance; ValidateTestAttributes = validateTestAttributes; ChainedCallbacks = callbacks; }
internal TestContext NewContext(bool validateTestAttributes = false, ICommandCallbacks callbacks = null) { int index = System.Threading.Interlocked.Increment(ref InstanceCount) - 1; var newCtx = new TestContext(this, index, validateTestAttributes, callbacks); // Mark the current TPM commands execution span as belonging to the // Tpm2Tester infrastructure newCtx.TestStarted(LibTesterInfraName); return(newCtx); }
public void SetCommandCallbacks(ICommandCallbacks callbacks) { CommandCallbacks = callbacks; }