Skip to content

Commit

Permalink
Use correct path in setup_schema when running via meson
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Nov 15, 2023
1 parent 63eff68 commit afe43a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ mod test {
// Run once before tests are executed.
#[ctor]
fn setup_schema() {
let schema_dir = concat!(env!("CARGO_MANIFEST_DIR"), "/data");
let schema_dir = &env::var("GSETTINGS_SCHEMA_DIR")
.unwrap_or(concat!(env!("CARGO_MANIFEST_DIR"), "/data").into());

let output = Command::new("glib-compile-schemas")
.arg(schema_dir)
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ test(
],
env: [
'RUST_BACKTRACE=1',
'GSETTINGS_SCHEMA_DIR=@0@/data'.format(meson.project_build_root()),
cargo_env
],
timeout: 300, # give cargo more time
Expand Down

0 comments on commit afe43a5

Please sign in to comment.