Example #1
0
 public ChildBuilder(int iport)
 {
     port = iport;
     childBuilderstoragePath = childBuilderstoragePath + "/" + "ChildBuilder#" + port;
     if (!Directory.Exists(childBuilderstoragePath))
     {
         Directory.CreateDirectory(childBuilderstoragePath);
     }
     librariespath = childBuilderstoragePath + "/" + "MyLibraries";
     if (!Directory.Exists(librariespath))
     {
         Directory.CreateDirectory(librariespath);
     }
     comm = new Comm("http://localhost", port);
     childBuilderAddress = "http://localhost:" + port.ToString() + "/IMessagePassingComm";
     sendReadyMessage();
     buildRequest = new BuildRequest();
     testRequest  = new TestRequest();
     msgHandler   = new Thread(processMessages);
     msgHandler.Start();
 }
        //----------------------<Functionto parse tehe test request for the test harness>-------------------------------
        public void parseTestRequest(TestRequest tr, List <string> names)
        {
            List <string> file = new List <string>();

            foreach (string s in names)
            {
                string fileName = Path.GetFileName(s);
                file.Add(fileName);
            }
            names = file;
            Console.WriteLine("\n\nParsing test Message");


            foreach (TestElement item in tr.tests)
            {
                foreach (TestName b in item.testDriver)
                {
                    if (names.Contains(b.testName))
                    {
                        Console.WriteLine("test driver found" + b.testName);
                    }
                    else
                    {
                        Console.WriteLine("Test Driver not found");
                    }
                }
                foreach (TestName b in item.testCodes)
                {
                    if (names.Contains(b.testName))
                    {
                        Console.WriteLine("source driver found" + b.testName);;
                    }
                    else
                    {
                        Console.WriteLine("Source Driver not found");
                    }
                }
            }
        }