From ad3bc07cc46af26c13823faf536495ff423d7bc9 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 19 Mar 2019 00:04:39 +0100 Subject: Add travis integration --- dhall/Cargo.toml | 3 +++ dhall/tests/common/mod.rs | 26 +++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'dhall') diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml index fd462b1..3c3e375 100644 --- a/dhall/Cargo.toml +++ b/dhall/Cargo.toml @@ -7,6 +7,9 @@ edition = "2018" [lib] doctest = false +[features] +nothreads = [] # disable threads for tarpaulin + [dependencies] bytecount = "0.5.1" itertools = "0.8.0" diff --git a/dhall/tests/common/mod.rs b/dhall/tests/common/mod.rs index 0589a4a..d18b4bf 100644 --- a/dhall/tests/common/mod.rs +++ b/dhall/tests/common/mod.rs @@ -24,18 +24,22 @@ macro_rules! make_spec_test { #[allow(non_snake_case)] fn $name() { use crate::common::*; - use std::thread; - // The parser stack overflows even on small files - // when compiled without optimizations - thread::Builder::new() - .stack_size(4 * 1024 * 1024) - .spawn(move || { - run_test($path, Feature::$type); - }) - .unwrap() - .join() - .unwrap(); + if cfg!(feature="nothreads") { + run_test($path, Feature::$type); + } else { + use std::thread; + // The parser stack overflows even on small files + // when compiled without optimizations + thread::Builder::new() + .stack_size(4 * 1024 * 1024) + .spawn(move || { + run_test($path, Feature::$type); + }) + .unwrap() + .join() + .unwrap(); + } } }; } -- cgit v1.2.3