Skip to content

Commit

Permalink
add lit command to xtask
Browse files Browse the repository at this point in the history
  • Loading branch information
mhasel committed Jan 16, 2025
1 parent 2ff1f03 commit 31e0fa4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/codegen/tests/code_gen_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4098,6 +4098,7 @@ fn variables_in_var_external_block_are_not_generated() {
}

#[test]
#[ignore = "tracked in issue #1389"]
fn function_with_array_string_return() {
let res = codegen(
"
Expand Down
2 changes: 1 addition & 1 deletion src/lowering/calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ mod tests {
#[test]
fn function_wirh_array_of_string_return() {
let id_provider = IdProvider::default();
let (mut unit, index, ..) = index_and_lower(
let (unit, index, ..) = index_and_lower(
r#"
FUNCTION foo : ARRAY[0..1] OF STRING
foo[0] := 'hello';
Expand Down
15 changes: 13 additions & 2 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enum Command {
#[arg(value_enum, long, global = true, default_value_t = ReporterType::Sysout)]
reporter: ReporterType,
},
Lit,
}

#[derive(Subcommand, Clone)]
Expand All @@ -40,9 +41,19 @@ enum Action {

fn main() -> anyhow::Result<()> {
let params = Parameters::parse();
let Command::Metrics { action, reporter } = params.command;
run_metrics(action, reporter)?;
match params.command {
Command::Metrics { action, reporter } => run_metrics(action, reporter)?,
Command::Lit => run_lit()?,
};

Ok(())
}

fn run_lit() -> Result<()> {
let sh = Shell::new()?;

// Run compile
sh.cmd("scripts/build.sh").args(&["--lit"]).run()?;
Ok(())
}

Expand Down

0 comments on commit 31e0fa4

Please sign in to comment.