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 19, 2022
1 parent 7baf3ad commit 82ad67d
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 @@ -85,7 +85,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 @@ -69,6 +69,7 @@ test(
env: [
'RUST_BACKTRACE=1',
'CARGO_HOME=@0@'.format(cargo_home),
'GSETTINGS_SCHEMA_DIR=@0@/data'.format(meson.project_build_root()),
'PATH=/app/bin:/usr/bin:/usr/lib/sdk/llvm14/bin:/usr/lib/sdk/rust-stable/bin', # TODO Remove llvm14 once removed in manifest
],
timeout: 300, # give cargo more time
Expand Down

0 comments on commit 82ad67d

Please sign in to comment.