Skip to content

Commit abaf572

Browse files
emaicusbmcutler
authored andcommitted
Isolate testcases (#15)
* removed emma, fixed cmake * removed emma, fixed cmake * small edits
1 parent 7232279 commit abaf572

File tree

2 files changed

+39
-52
lines changed

2 files changed

+39
-52
lines changed

examples/10_java_coverage/config/config.json

Lines changed: 36 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,21 @@
3333
// COVERAGE USING JACOCO
3434
// JaCoCo can do on-demand instrumentation
3535
{
36-
"title" : "JaCoCo - Running Student JUnit Tests in hw0/tests/",
37-
"command" : "java -noverify -javaagent:submitty_jacocoagent.jar=destfile=coverage.exec -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_junit/:. TestRunner hw0",
38-
"points" : 4,
39-
"validation" : [
40-
{
41-
"method" : "MultipleJUnitTestGrader",
42-
"actual_file" : "STDOUT.txt"
43-
}
44-
]
45-
},
46-
{
47-
"title" : "JaCoCo - Generating Coverage Report for Student Tests",
48-
"command" : "java -jar submitty_jacococli.jar report coverage.exec --classfiles hw0 --csv jacoco_report.csv",
49-
"points" : 6,
36+
"title" : "JaCoCo - Running Student JUnit Tests in hw0/tests/ and Generating Coverage Report for Student Tests",
37+
"command" : ["java -noverify -javaagent:submitty_jacocoagent.jar=destfile=coverage.exec -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_junit/:. TestRunner hw0",
38+
"java -jar submitty_jacococli.jar report coverage.exec --classfiles hw0 --csv jacoco_report.csv"
39+
],
40+
"points" : 10,
5041
"validation" : [
42+
{
43+
44+
"method" : "MultipleJUnitTestGrader",
45+
"actual_file" : "STDOUT_0.txt",
46+
"deduction" : 0.5
47+
},
5148
{
5249
"method" : "errorIfEmpty",
53-
"actual_file" : "STDOUT.txt",
50+
"actual_file" : "STDOUT_1.txt",
5451
"description" : "JaCoCo report generation output",
5552
"deduction" : 0.0
5653
},
@@ -59,15 +56,15 @@
5956
"actual_file" : "jacoco_report.csv",
6057
"description" : "JaCoCo coverage report",
6158
// specify the package & class to check (can omit to check all)
62-
"package" : "hw0",
59+
"package" : "hw0",
6360
//"class" : "Factorial",
6461
// which threshold(s) to apply
6562
"instruction_coverage_threshold" : 90,
6663
//"branch_coverage_threshold" : 90,
6764
//"line_coverage_threshold" : 70,
6865
//"complexity_coverage_threshold" : 80,
6966
//"method_coverage_threshold" : 80,
70-
"deduction" : 1.0
67+
"deduction" : 0.5
7168
}
7269
]
7370
},
@@ -82,53 +79,39 @@
8279
"num_tests" : 4
8380
}
8481
]
85-
},
86-
87-
82+
}
83+
/*,
84+
Sorry! Emma is no longer currently supported.
8885
// ------------------------------------------------------------------------------
8986
// COVERAGE USING EMMA
9087
{
91-
"title" : "EMMA - Instrumentation of Student Code",
88+
"title" : "EMMA - Instrument of Student Code, Run JUnit Tests, and Generate Coverage Report",
9289
"command" : "java -cp submitty_emma.jar emma instr -m overwrite -ip hw0",
93-
"points" : 0,
90+
"points" : 10,
9491
"validation" : [
9592
{
9693
"method" : "EmmaInstrumentationGrader",
97-
"actual_file" : "STDOUT.txt"
98-
}
99-
]
100-
},
101-
{
102-
"title" : "EMMA - Running Student JUnit Tests in hw0/tests/",
103-
"command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_emma.jar:submitty_junit/:. TestRunner hw0",
104-
"points" : 4,
105-
"validation" : [
94+
"actual_file" : "STDOUT.txt",
95+
"deduction" : 0.0
96+
},
10697
{
10798
"method" : "MultipleJUnitTestGrader",
108-
"actual_file" : "STDOUT.txt"
99+
"actual_file" : "STDOUT_0.txt"
100+
},
101+
{
102+
"method" : "errorIfEmpty",
103+
"actual_file" : "STDOUT_1.txt",
104+
"description" : "EclEmma report generation output",
105+
"deduction" : 0.0
106+
},
107+
{
108+
"method" : "EmmaCoverageReportGrader",
109+
"actual_file" : "emma_report.txt",
110+
"description" : "EclEmma coverage report",
111+
"coverage_threshold" : 90
109112
}
110113
]
111114
},
112-
{
113-
"title" : "EMMA - Generating Coverage Report for Student Tests",
114-
"command" : "java -cp submitty_emma.jar emma report -r txt -in coverage.em,coverage.ec -Dreport.txt.out.file=emma_report.txt",
115-
"points" : 6,
116-
"validation" : [
117-
{
118-
"method" : "errorIfEmpty",
119-
"actual_file" : "STDOUT.txt",
120-
"description" : "EclEmma report generation output",
121-
"deduction" : 0.0
122-
},
123-
{
124-
"method" : "EmmaCoverageReportGrader",
125-
"actual_file" : "emma_report.txt",
126-
"description" : "EclEmma coverage report",
127-
"coverage_threshold" : 90,
128-
"deduction" : 1.0
129-
}
130-
]
131-
},
132115
{
133116
"title" : "EMMA - Instructor JUnit Tests",
134117
"command" : "java -noverify -cp submitty_junit.jar:submitty_hamcrest.jar:submitty_emma.jar:. org.junit.runner.JUnitCore hw0.test.FactorialTest",
@@ -141,6 +124,7 @@
141124
}
142125
]
143126
}
127+
*/
144128

145129
]
146130
}

examples/13_cmake_compilation/config/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"autograding" : {
3+
"submission_to_compilation" : ["CMakeLists.txt"]
4+
},
25
"max_submission_size" : 1000000,
36
"testcases" : [
47

0 commit comments

Comments
 (0)