forked from Cutieguwu/raven
Fixed raven test. The raven test system needs to be redesigned in order to run multiple different test classes. Cyclic dependencies cannot be resolved the curent build system so a parser needs to be implemented to get the import statements.
This commit is contained in:
19
src/java.rs
19
src/java.rs
@@ -96,12 +96,14 @@ impl JVM {
|
|||||||
for part in &cmd {
|
for part in &cmd {
|
||||||
println!("{}", part);
|
println!("{}", part);
|
||||||
}
|
}
|
||||||
|
cmd.push("-cp".to_string());
|
||||||
cmd.push(entry_point.as_ref().display().to_string());
|
cmd.push(entry_point.as_ref().display().to_string());
|
||||||
|
|
||||||
|
// Jave needs a class path and a file name to run.
|
||||||
|
cmd.push("Test".to_string());
|
||||||
|
|
||||||
println!("Fence 6");
|
println!("Fence 6");
|
||||||
for part in &cmd {
|
println!("{:?}", cmd.as_slice());
|
||||||
println!("{}", part);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
println!("Fence 7");
|
println!("Fence 7");
|
||||||
@@ -136,12 +138,7 @@ pub enum VMFlag {
|
|||||||
|
|
||||||
impl Into<Vec<String>> for VMFlag {
|
impl Into<Vec<String>> for VMFlag {
|
||||||
fn into(self) -> Vec<String> {
|
fn into(self) -> Vec<String> {
|
||||||
match self {
|
vec![self.to_string()]
|
||||||
Self::EnableAssert => vec![String::from("-ea")],
|
|
||||||
Self::HeapMax { size } => vec![format!("Xmx{}", size)],
|
|
||||||
Self::HeapMin { size } => vec![format!("Xms{}", size)],
|
|
||||||
Self::Version => vec![String::from("--version")],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,8 +151,8 @@ impl fmt::Display for VMFlag {
|
|||||||
"-{}",
|
"-{}",
|
||||||
match self {
|
match self {
|
||||||
Self::EnableAssert => String::from("ea"),
|
Self::EnableAssert => String::from("ea"),
|
||||||
Self::HeapMax { size } => format!("Xmx{}", size),
|
Self::HeapMax { size } => format!("Xmx{}", size.as_u64()),
|
||||||
Self::HeapMin { size } => format!("Xms{}", size),
|
Self::HeapMin { size } => format!("Xms{}", size.as_u64()),
|
||||||
Self::Version => String::from("-version"), // --version
|
Self::Version => String::from("-version"), // --version
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ fn new(project_name: String) -> anyhow::Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn build() -> anyhow::Result<()> {
|
fn build() -> anyhow::Result<()> {
|
||||||
let mut targets: Vec<PathBuf> = crate::fs::expand_files(PROJECT_ROOT.clone().join(DIR_SRC.as_path()))?
|
let mut targets: Vec<PathBuf> = crate::fs::expand_files(DIR_SRC.as_path())?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|f| {
|
.filter(|f| {
|
||||||
f.extension()
|
f.extension()
|
||||||
@@ -266,7 +266,7 @@ fn test(assertions: bool) -> anyhow::Result<(Option<String>, Option<String>)> {
|
|||||||
.ram_max(ByteSize::mib(512))
|
.ram_max(ByteSize::mib(512))
|
||||||
.monitor(true)
|
.monitor(true)
|
||||||
.build()
|
.build()
|
||||||
.run(DIR_TEST.as_path())
|
.run(DIR_TARGET.as_path())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn clean() {
|
fn clean() {
|
||||||
|
|||||||
Reference in New Issue
Block a user