summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/headers/call-conv-field.h6
-rw-r--r--tests/tests.rs3
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/headers/call-conv-field.h b/tests/headers/call-conv-field.h
index 310b5c32..3488cd5b 100644
--- a/tests/headers/call-conv-field.h
+++ b/tests/headers/call-conv-field.h
@@ -1,5 +1,11 @@
// bindgen-flags: -- -target i686-pc-win32
// bindgen-unstable
+// bindgen-generate-bindings-on-linux-only
+//
+// The linux-only thing is a hack around our lack of understanding when
+// bindgen's target_os != the bindings' target_os :(
+//
+// https://github.com/servo/rust-bindgen/issues/593
struct JNINativeInterface_ {
int (__stdcall *GetVersion)(void *env);
diff --git a/tests/tests.rs b/tests/tests.rs
index c7e03cb5..85fcc197 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -92,6 +92,9 @@ fn create_bindgen_builder(header: &PathBuf) -> Result<Option<Builder>, Error> {
.map(ToString::to_string)
.chain(flags)
.collect();
+ } else if line.contains("bindgen-generate-bindings-on-linux-only") &&
+ !cfg!(target_os = "linux") {
+ return Ok(None);
}
}