Skip to content

Commit

Permalink
updated JUnit and PITest, fixed mutation testing shell command
Browse files Browse the repository at this point in the history
  • Loading branch information
DhruvDh committed Jan 31, 2024
1 parent 7c799a2 commit ec9a72b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/grade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ impl UnitTestGrader {
.args([
"--class-path",
classpath()?.as_str(),
"org.pitest.mutation test.commandline.MutationCoverageReport",
"org.pitest.mutationtest.commandline.MutationCoverageReport",
"--reportDir",
"test_reports",
"--failWhenNoMutations",
Expand Down Expand Up @@ -1386,7 +1386,7 @@ impl UnitTestGrader {
let penalty = diags.len() as u32 * 4;
eprintln!("Ran mutation tests for {} -", target_test.join(", "));
let num_diags = diags.len();
eprintln!("Problematic mutation test failures printed about.");
eprintln!("Problematic mutation test failures printed above.");

let prompt = if num_diags > 0 {
let context = get_source_context(diags.clone(), project, 3, 6, 6, false, None)?;
Expand Down
24 changes: 17 additions & 7 deletions src/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ impl Project {

let handle1 = tokio::spawn(async {
download(
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/junit-platform-console-standalone-1.9.0-RC1.jar",
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/junit-platform-console-standalone-1.10.1.jar",
&LIB_DIR.join(JUNIT_PLATFORM),
false
)
Expand All @@ -1256,7 +1256,7 @@ impl Project {

let handle3 = tokio::spawn(async {
download(
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-1.9.5.jar",
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-1.15.6.jar",
&LIB_DIR.join("pitest.jar"),
false,
)
Expand All @@ -1265,7 +1265,7 @@ impl Project {

let handle4 = tokio::spawn(async {
download(
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-command-line-1.9.5.jar",
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-command-line-1.15.6.jar",
&LIB_DIR.join("pitest-command-line.jar"),
false,
)
Expand All @@ -1274,7 +1274,7 @@ impl Project {

let handle5 = tokio::spawn(async {
download(
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-entry-1.9.5.jar",
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-entry-1.15.6.jar",
&LIB_DIR.join("pitest-entry.jar"),
false,
)
Expand All @@ -1283,15 +1283,25 @@ impl Project {

let handle6 = tokio::spawn(async {
download(
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-junit5-plugin-1.0.0.jar",
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/pitest-junit5-plugin-1.2.1.jar",
&LIB_DIR.join("pitest-junit5-plugin.jar"),
false,
)
.await
});

let handles =
FuturesUnordered::from_iter([handle1, handle2, handle3, handle4, handle5, handle6]);
let handle7 = tokio::spawn(async {
download(
"https://ummfiles.fra1.digitaloceanspaces.com/jar_files/commons-lang3-3.14.0.jar",
&LIB_DIR.join("commons-lang3-3.14.0.jar"),
false,
)
.await
});

let handles = FuturesUnordered::from_iter([
handle1, handle2, handle3, handle4, handle5, handle6, handle7,
]);

futures::future::try_join_all(handles).await?;
}
Expand Down

0 comments on commit ec9a72b

Please sign in to comment.