예제 #1
0
	def test(self, studentDir):
		self.testSuite = SysCallTestSuite(studentDir)
		print self.testSuite.tests
		self.testSuite.run()
		self.testSuite.cleanup()
		self.totalScore = self.testSuite.report.score + self.testSuite.hiddenReport.score
		self.maxScore = self.testSuite.report.totalScore + self.testSuite.hiddenReport.totalScore 		
예제 #2
0
class SysCallGrader(Grader):
	def __init__(self, studentDir, studentID, project):
		Grader.__init__(self, studentID, studentDir, project)
		print "init : %s"%(studentID)
		self.dueDay = 15
		self.dueMonth = 02
		self.studentID = studentID
		self.clearReports = False
	
	def test(self, studentDir):
		self.testSuite = SysCallTestSuite(studentDir)
		print self.testSuite.tests
		self.testSuite.run()
		self.testSuite.cleanup()
		self.totalScore = self.testSuite.report.score + self.testSuite.hiddenReport.score
		self.maxScore = self.testSuite.report.totalScore + self.testSuite.hiddenReport.totalScore 		
	
	def appendGradingReport(self, fileHandle):
		# writes out in to the file in the format - section, uname, submission delay, visible_score, hidden_score, ec_score	
		content = ("%s, %s, %s, %s, %s\n"%(self.section, self.studentID, self.lateDays, self.testSuite.report.score, self.testSuite.hiddenReport.score))
		fileHandle.write(content)
		fileHandle.flush()