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 {
|
||||
println!("{}", part);
|
||||
}
|
||||
cmd.push("-cp".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");
|
||||
for part in &cmd {
|
||||
println!("{}", part);
|
||||
}
|
||||
println!("{:?}", cmd.as_slice());
|
||||
|
||||
|
||||
println!("Fence 7");
|
||||
@@ -136,12 +138,7 @@ pub enum VMFlag {
|
||||
|
||||
impl Into<Vec<String>> for VMFlag {
|
||||
fn into(self) -> Vec<String> {
|
||||
match self {
|
||||
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")],
|
||||
}
|
||||
vec![self.to_string()]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,8 +151,8 @@ impl fmt::Display for VMFlag {
|
||||
"-{}",
|
||||
match self {
|
||||
Self::EnableAssert => String::from("ea"),
|
||||
Self::HeapMax { size } => format!("Xmx{}", size),
|
||||
Self::HeapMin { size } => format!("Xms{}", size),
|
||||
Self::HeapMax { size } => format!("Xmx{}", size.as_u64()),
|
||||
Self::HeapMin { size } => format!("Xms{}", size.as_u64()),
|
||||
Self::Version => String::from("-version"), // --version
|
||||
}
|
||||
)
|
||||
|
||||
@@ -186,7 +186,7 @@ fn new(project_name: String) -> 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()
|
||||
.filter(|f| {
|
||||
f.extension()
|
||||
@@ -266,7 +266,7 @@ fn test(assertions: bool) -> anyhow::Result<(Option<String>, Option<String>)> {
|
||||
.ram_max(ByteSize::mib(512))
|
||||
.monitor(true)
|
||||
.build()
|
||||
.run(DIR_TEST.as_path())
|
||||
.run(DIR_TARGET.as_path())
|
||||
}
|
||||
|
||||
fn clean() {
|
||||
|
||||
Reference in New Issue
Block a user