public void Evaluate(SubmissionJson submission) { Console.WriteLine("Evaluation Started"); ICompiler compiler = CompilerFactory.GetCompiler(submission.Language); string executablePath = String.Empty; string testsFolder = String.Empty; if (compiler != null) { if (compiler.Compile(submissionsPaths[submission.Id], out executablePath)) { Console.WriteLine("Source successfully compiled"); testsFolder = @"b:\tests\"; File.Copy(executablePath, @"b:\tests\a.exe", true); foreach (var test in repository.Tests) { ProblemTest problemTest = new ProblemTest() { Id = test.Id, Name = test.Name, Data = test.Data }; Execution execution = worker.Execute2(@"b:\tests\adunare", problemTest, null); } } else { Console.WriteLine("Source has compiled with errors"); } } }
public void Evaluate(SubmissionJson submission) { Console.WriteLine("Evaluation Started"); ICompiler compiler = CompilerFactory.GetCompiler(submission.Language); string executablePath = String.Empty; string testsFolder = String.Empty; if (compiler != null) { if (compiler.Compile(submissionsPaths[submission.Id], out executablePath)) { testsFolder = TestsDirectory.FullName + "\\" + submission.SubmissionProblemId + "\\"; File.Copy(executablePath, WorkAreaDirectory.FullName + "\\" + submission.SubmissionProblemId + Constants.exe, true); foreach (var test in repository.Tests) { } } } }