-
Notifications
You must be signed in to change notification settings - Fork 160
/
Program.cs
45 lines (37 loc) · 1.47 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tpm2Lib;
using Tpm2Tester;
namespace Tpm2TestSuite
{
partial class Tpm2Tests
{
public static readonly AuthValue NullAuth = new AuthValue();
// Primary object representing the test infrastructure
internal static TestSubstrate Substrate;
// Shortcut to the test configuration member of the Substrate object
internal static TestConfig TestCfg;
// Shortcut to the TPM configuration member of the Substrate object
internal static TpmConfig TpmCfg;
static void Main(string[] args)
{
// Pass an instance of the calss implementing test methods
Substrate = TestSubstrate.Create(args, new Tpm2Tests());
if (Substrate == null)
{
Console.WriteLine("Failed to initialize Tpm2Tester framework (bad command line " +
"or no test cases found in MyTestCases). Aborting...");
return;
}
// Initialize the shortcuts to the Substrate members (just a convenience)
TestCfg = Substrate.TestCfg;
// Note that the members of TpmCfg are not initialized at this point yet.
// But they will be when the test cases are invoked by the substrate later.
TpmCfg = Substrate.TpmCfg;
Substrate.RunTestSession();
}
}
}