Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
gio: Actually fix pkg-config names properly
Browse files Browse the repository at this point in the history
  • Loading branch information
sdroege authored and bilelmoussaoui committed Nov 3, 2020
1 parent d0eaee1 commit 6257592
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions gio/sys/tests/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use std::process::Command;
use std::str;
use tempfile::Builder;

static PACKAGES: &[&str] = &["gio-2.0"];
static PACKAGES_FALLBACK: &[&str] = &["gio-2.0-unix", "glib-2.0"];
static PACKAGES_UNIX: &[&str] = &["gio-2.0", "gio-unix-2.0"];
static PACKAGES_WINDOWS: &[&str] = &["gio-2.0"];

#[derive(Clone, Debug)]
struct Compiler {
Expand Down Expand Up @@ -132,10 +132,13 @@ fn cross_validate_constants_with_c() {
.prefix("abi")
.tempdir()
.expect("temporary directory");
let cc = match Compiler::new(PACKAGES) {
Ok(cc) => Ok(cc),
Err(_) => Compiler::new(PACKAGES_FALLBACK),
}.expect("configured compiler");

let cc = if cfg!(target_family = "windows") {
Compiler::new(PACKAGES_WINDOWS)
} else {
Compiler::new(PACKAGES_UNIX)
}
.expect("configured compiler");

assert_eq!(
"1",
Expand Down Expand Up @@ -175,10 +178,13 @@ fn cross_validate_layout_with_c() {
.prefix("abi")
.tempdir()
.expect("temporary directory");
let cc = match Compiler::new(PACKAGES) {
Ok(cc) => Ok(cc),
Err(_) => Compiler::new(PACKAGES_FALLBACK),
}.expect("configured compiler");

let cc = if cfg!(target_family = "windows") {
Compiler::new(PACKAGES_WINDOWS)
} else {
Compiler::new(PACKAGES_UNIX)
}
.expect("configured compiler");

assert_eq!(
Layout {
Expand Down

0 comments on commit 6257592

Please sign in to comment.