コード例 #1
0
        static void TabulateEach()
        {
            foreach (var operation in s_operations)
            {
                foreach (var testPackage in operation.TestPackages)
                {
                    using (testPackage)
                    {
                        string reportPrefix = operation.GenerateReportPrefix(testPackage.Name);

                        // Tabulate the package
                        using (var tab = new Tabulator(reportPrefix))
                        {
                            tab.ReportIds       = s_reportIds;
                            tab.ExitAfterSelect = s_exitAfterIds;
                            tab.ExportRubrics   = s_exportRubrics;
                            tab.DeDuplicate     = s_deDuplicate;
                            if (operation.IdFilename != null)
                            {
                                tab.SelectItems(new IdReadable(operation.IdFilename, c_DefaultBankKey));
                            }
                            tab.Tabulate(testPackage);
                        }

                        // If JSON error report required - do the conversion
                        if (s_json)
                        {
                            CsvToJson.ConvertErrorReport(
                                string.Concat(reportPrefix, "_", c_ErrorReportFn),
                                CsvToJson.GenerateErrorReportJsonFilename(reportPrefix, testPackage));
                        }
                    }
                }
            }
        }
コード例 #2
0
        static void TabulateAggregate()
        {
            // Figure out the reporting prefix
            string reportPrefix;

            if (s_aggregateReportPrefix != null)
            {
                reportPrefix = s_aggregateReportPrefix;
            }
            else
            {
                string packagePath = s_operations[0].PackagePath;
                if (packagePath == null)
                {
                    throw new ArgumentException("Item bank tabulation must specify '-o' report prefix.");
                }
                reportPrefix = Path.Combine(Path.GetDirectoryName(packagePath), c_AggregatePrefix);
            }

            using (var tab = new Tabulator(reportPrefix))
            {
                tab.ReportIds       = s_reportIds;
                tab.ExitAfterSelect = s_exitAfterIds;
                tab.ExportRubrics   = s_exportRubrics;
                tab.DeDuplicate     = s_deDuplicate;

                foreach (var operation in s_operations)
                {
                    foreach (var testPackage in operation.TestPackages)
                    {
                        using (testPackage)
                        {
                            if (operation.IdFilename != null)
                            {
                                tab.SelectItems(new IdReadable(operation.IdFilename, c_DefaultBankKey));
                            }
                            tab.Tabulate(testPackage);
                        }
                    }
                }
            }
        }