예제 #1
0
 internal TestContext(TestLogger logger, int instance,
                      bool validateTestAttributes,
                      ICommandCallbacks callbacks = null)
 {
     Logger   = logger;
     Instance = instance;
     ValidateTestAttributes = validateTestAttributes;
     ChainedCallbacks       = callbacks;
 }
예제 #2
0
        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);
        }
예제 #3
0
 public void SetCommandCallbacks(ICommandCallbacks callbacks)
 {
     CommandCallbacks = callbacks;
 }