예제 #1
0
파일: RunInfo.cs 프로젝트: dotnet/wpf-test
        /// <summary>
        /// Packages the lab specified run settings into the RunInfo type, for consumption by reporting tools.
        /// </summary>
        /// <returns></returns>
        public static RunInfo FromEnvironment()
        {
            RunInfo info = new RunInfo();

            info.Architecture     = Environment.GetEnvironmentVariable("ArchType");
            info.Branch           = Environment.GetEnvironmentVariable("Branch");
            info.Build            = Environment.GetEnvironmentVariable("Build");
            info.Date             = Environment.GetEnvironmentVariable("RunDate");
            info.Dpi              = Environment.GetEnvironmentVariable("DPI");
            info.Id               = Environment.GetEnvironmentVariable("RunID");
            info.IEVersion        = Environment.GetEnvironmentVariable("IEversion");
            info.InstallerPath    = Environment.GetEnvironmentVariable("BuildPath");
            info.IsAppVerify      = Environment.GetEnvironmentVariable("AppVerify");
            info.IsCodeCoverage   = Environment.GetEnvironmentVariable("CodeCoverage");
            info.Language         = Environment.GetEnvironmentVariable("OSLang");
            info.Name             = Environment.GetEnvironmentVariable("RunTitle");
            info.OS               = Environment.GetEnvironmentVariable("OSPlatform");
            info.Priority         = Environment.GetEnvironmentVariable("Priority");
            info.RunType          = Environment.GetEnvironmentVariable("RunTypeCode");
            info.TestBinariesPath = Environment.GetEnvironmentVariable("BinaryLocation");
            info.Version          = Environment.GetEnvironmentVariable("VersionsFilter");
            info.RunTypeCode      = Environment.GetEnvironmentVariable("RunTypeCode");

            //We don't track this as a lab specified thing right now... For now, this hinges on the machine performing distribution.
//            info.IsMultiMonitor = ParseBool(Environment.GetEnvironmentVariable("IsMultiMonitor"));
            return(info);
        }
예제 #2
0
파일: RunInfo.cs 프로젝트: dotnet/wpf-test
        /// <summary>
        /// Provides a rough report of Machine information, queried against OS info.
        /// Not guaranteed to be consistent with Lab specified properties. This is only produced on local runs.
        /// </summary>
        /// <returns></returns>
        public static RunInfo FromOS()
        {
            RunInfo info = new RunInfo();

            info.OS           = Environment.OSVersion.ToString();
            info.Architecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
            return(info);
        }
예제 #3
0
파일: RunInfo.cs 프로젝트: dotnet/wpf-test
        /// <summary>
        /// Loads RunInfo from from file.
        /// </summary>
        /// <param name="serializationDirectory"></param>
        /// <returns></returns>
        public static RunInfo Load(DirectoryInfo serializationDirectory)
        {
            RunInfo  runinfo  = null;
            FileInfo filePath = null;

            try
            {
                filePath = new FileInfo(Path.Combine(serializationDirectory.FullName, serializationFileName));
                using (XmlTextReader textReader = new XmlTextReader(filePath.OpenRead()))
                {
                    runinfo = (RunInfo)ObjectSerializer.Deserialize(textReader, typeof(RunInfo), null);
                }
            }
            catch (Exception e)
            {
                throw new IOException("Failed to Deserialize: " + filePath.FullName, e);
            }
            return(runinfo);
        }
예제 #4
0
 /// <summary>
 /// Produce a comprehensive static xml report from the test results
 /// </summary>
 public void GenerateXmlReport(TestRecords tests, RunInfo runInfo, DirectoryInfo reportRoot, DirectoryInfo testBinariesDirectory)
 {
     Profiler.StartMethod();
     ReportingEngine.GenerateXmlReport(tests, runInfo, reportRoot, testBinariesDirectory);
     Profiler.EndMethod();
 }