Skip to content

Commit

Permalink
Merge pull request #8 from indiv0/chore-fix-travis-osx
Browse files Browse the repository at this point in the history
Fix OS X CI builds
  • Loading branch information
indiv0 committed Dec 1, 2016
2 parents fe7c221 + e67d673 commit ab3736a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ before_script:
else
export PATH=$HOME/Library/Python/2.7/bin:$PATH
fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install openssl && \
export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include && \
export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib && \
echo "Installed OpenSSL for OS X."
fi
# the main build
script:
- |
Expand All @@ -47,11 +54,16 @@ script:
else
travis-cargo bench
fi &&
travis-cargo --only stable doc
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
travis-cargo --only stable doc
fi
after_success:
# upload the documentation from the build with stable (automatically only
# actually runs from the master branch, not individual PRs)
- travis-cargo --only stable doc-upload
# actually runs from the master branch, not individual PRs), not on OS X.
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
travis-cargo --only stable doc-upload
fi
# measure code coverage and upload to coveralls.io (the verify argument
# mitigates kcov crashes due to malformed debuginfo, at the cost of some
# speed. <https://github.com/huonw/travis-cargo/issues/12>)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ version = "0.8.19"
[dependencies]
log = "0.3.6"
serde = "0.8.19"
serde_xml = "0.9.1"
serde_xml = "0.8.1"

[dependencies.clippy]
optional = true
Expand Down
8 changes: 7 additions & 1 deletion src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include!(concat!(env!("OUT_DIR"), "/model.rs"));
mod tests {
use serde_xml::from_str;

use super::{Img, Infos, Pod, QueryResult, Subpod};
use super::{Img, Infos, Plaintext, Pod, QueryResult, Subpod};

#[test]
fn test_query_result_deserializer() {
Expand Down Expand Up @@ -91,6 +91,12 @@ mod tests {
from_str::<Img>(&s).unwrap();
}

#[test]
fn test_plaintext_deserializer() {
from_str::<Plaintext>(&"<plaintext>pi</plaintext>".to_owned()).unwrap();
from_str::<Option<Plaintext>>(&"<plaintext/>".to_owned()).unwrap();
}

#[test]
fn test_infos_deserializer() {
let s = INFOS_STR.to_owned();
Expand Down

0 comments on commit ab3736a

Please sign in to comment.