@@ -268,8 +268,7 @@ export class OverlayGrader extends Grader<OverlayPawtograderConfig> {
268
268
artifacts : [ ]
269
269
}
270
270
}
271
- // const tmpDir = await mkdtemp(path.join(tmpdir(), 'pawtograder-'));
272
- console . log ( 'Beginning grading' )
271
+ this . logger . log ( 'visible' , 'Beginning grading' )
273
272
const tmpDir = path . join ( process . cwd ( ) , 'pawtograder-grading' )
274
273
await io . mkdirP ( tmpDir )
275
274
const solutionFiles = await readdir ( this . solutionDir )
@@ -282,19 +281,19 @@ export class OverlayGrader extends Grader<OverlayPawtograderConfig> {
282
281
}
283
282
} )
284
283
)
285
- console . log ( 'Copying student files' )
284
+ this . logger . log ( 'visible' , 'Copying student files' )
286
285
await this . copyStudentFiles ( 'files' )
287
286
await this . copyStudentFiles ( 'testFiles' )
288
287
289
- console . log ( 'Setting up virtual environment' )
288
+ this . logger . log ( 'visible' , 'Setting up virtual environment' )
290
289
291
290
if ( this . config . build . venv ?. cache_key && this . config . build . venv ?. dir_name ) {
292
291
const venv_dir = this . config . build . venv . dir_name
293
292
const cache_key = this . config . build . venv . cache_key
294
293
await this . builder . setupVenv ( venv_dir , cache_key )
295
294
}
296
295
297
- console . log ( 'Linting student submission' )
296
+ this . logger . log ( 'visible' , 'Linting student submission' )
298
297
const lintResult = await this . builder . lint ( )
299
298
if ( this . config . build . linter ?. policy === 'fail' ) {
300
299
if ( lintResult . status === 'fail' ) {
@@ -313,13 +312,17 @@ export class OverlayGrader extends Grader<OverlayPawtograderConfig> {
313
312
}
314
313
}
315
314
316
- console . log ( 'Resetting to run instructor tests on student submission' )
315
+ this . logger . log (
316
+ 'visible' ,
317
+ 'Resetting to run instructor tests on student submission'
318
+ )
317
319
await this . resetSolutionFiles ( )
318
320
await this . copyStudentFiles ( 'files' )
319
321
const gradedParts = this . config . gradedParts || [ ]
320
322
321
323
try {
322
- console . log (
324
+ this . logger . log (
325
+ 'visible' ,
323
326
'Building project with student submission and running instructor tests'
324
327
)
325
328
await this . builder . buildClean ( {
@@ -436,12 +439,13 @@ export class OverlayGrader extends Grader<OverlayPawtograderConfig> {
436
439
this . config . submissionFiles . testFiles . length > 0 &&
437
440
this . config . build . student_tests ?. instructor_impl ?. run_tests
438
441
) {
439
- console . log (
442
+ this . logger . log (
443
+ 'visible' ,
440
444
'Resetting to have student tests with the instructor solution'
441
445
)
442
446
await this . resetSolutionFiles ( )
443
447
await this . copyStudentFiles ( 'testFiles' )
444
- console . log ( 'Building solution and running student tests' )
448
+ this . logger . log ( 'visible' , 'Building solution and running student tests' )
445
449
try {
446
450
await this . builder . buildClean ( {
447
451
timeoutSeconds :
@@ -495,7 +499,10 @@ export class OverlayGrader extends Grader<OverlayPawtograderConfig> {
495
499
mutantFailureAdvice +=
496
500
'\n\nPlease fix the above errors and resubmit for grading.'
497
501
} else {
498
- console . log ( 'Running student tests against buggy solutions' )
502
+ this . logger . log (
503
+ 'visible' ,
504
+ 'Running student tests against buggy solutions'
505
+ )
499
506
try {
500
507
mutantResults = await this . builder . mutationTest ( {
501
508
timeoutSeconds :
@@ -514,7 +521,10 @@ export class OverlayGrader extends Grader<OverlayPawtograderConfig> {
514
521
this . config . build . student_tests ?. student_impl ?. run_tests ) &&
515
522
this . config . submissionFiles . testFiles . length > 0
516
523
) {
517
- console . log ( 'Running student tests against student implementation' )
524
+ this . logger . log (
525
+ 'visible' ,
526
+ 'Running student tests against student implementation'
527
+ )
518
528
try {
519
529
await this . resetSolutionFiles ( )
520
530
await this . copyStudentFiles ( 'testFiles' )
@@ -534,7 +544,7 @@ export class OverlayGrader extends Grader<OverlayPawtograderConfig> {
534
544
this . logger . log ( 'visible' , msg )
535
545
}
536
546
}
537
- console . log ( 'Wrapping up' )
547
+ this . logger . log ( 'visible' , 'Wrapping up' )
538
548
const testFeedbacks = gradedParts
539
549
. map ( ( part ) =>
540
550
this . gradePart ( part , testResults , mutantResults , mutantFailureAdvice )
0 commit comments