Move tests to in-binary and fix link args
This commit is contained in:
parent
4e54c159b6
commit
448e8ebbf7
2
ffi.rs
2
ffi.rs
|
|
@ -23,7 +23,7 @@ pub static SSL_ERROR_WANT_ACCEPT: c_int = 8;
|
||||||
pub static SSL_VERIFY_NONE: c_int = 0;
|
pub static SSL_VERIFY_NONE: c_int = 0;
|
||||||
pub static SSL_VERIFY_PEER: c_int = 1;
|
pub static SSL_VERIFY_PEER: c_int = 1;
|
||||||
|
|
||||||
#[link_args = "-lssl"]
|
#[link_args = "-lssl -lcrypto"]
|
||||||
extern "C" { }
|
extern "C" { }
|
||||||
|
|
||||||
externfn!(fn ERR_get_error() -> c_ulong)
|
externfn!(fn ERR_get_error() -> c_ulong)
|
||||||
|
|
|
||||||
3
lib.rs
3
lib.rs
|
|
@ -9,6 +9,9 @@ use std::libc::{c_int, c_void};
|
||||||
|
|
||||||
mod ffi;
|
mod ffi;
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests;
|
||||||
|
|
||||||
static mut STARTED_INIT: AtomicBool = INIT_ATOMIC_BOOL;
|
static mut STARTED_INIT: AtomicBool = INIT_ATOMIC_BOOL;
|
||||||
static mut FINISHED_INIT: AtomicBool = INIT_ATOMIC_BOOL;
|
static mut FINISHED_INIT: AtomicBool = INIT_ATOMIC_BOOL;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
extern mod ssl;
|
|
||||||
|
|
||||||
use std::rt::io::Writer;
|
use std::rt::io::Writer;
|
||||||
use std::rt::io::extensions::ReaderUtil;
|
use std::rt::io::extensions::ReaderUtil;
|
||||||
use std::rt::io::net::tcp::TcpStream;
|
use std::rt::io::net::tcp::TcpStream;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
|
||||||
use ssl::{Sslv23, SslCtx, SslStream, SslVerifyPeer};
|
use super::{Sslv23, SslCtx, SslStream, SslVerifyPeer};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_new_ctx() {
|
fn test_new_ctx() {
|
||||||
Loading…
Reference in New Issue