From e3fd3833eb1f22a75bbd478582b914916aed6fe9 Mon Sep 17 00:00:00 2001 From: Matti Pastell Date: Fri, 9 Jan 2015 14:17:56 +0200 Subject: [PATCH] Tweak tests to run on nightly --- .travis.yml | 24 +++++++++++++----------- test/cache_test.jl | 20 +++++++++++--------- test/gadfly_formats.jl | 5 +++++ test/runtests.jl | 14 ++++++-------- 4 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 362b584..f24f1a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,24 @@ -#language: cpp -#compiler: -# - clang + language: julia julia: - release -# - nightly + - nightly +matrix: + allow_failures: + - julia: nightly notifications: email: false before_install: -# - sudo add-apt-repository ppa:staticfloat/julia-deps -y -# - sudo add-apt-repository ppa:staticfloat/${JULIAVERSION} -y - - sudo apt-get update -qq -y - - sudo apt-get install python-matplotlib -y -# + #- sudo apt-get update -qq -y + #- sudo apt-get install python-matplotlib -y + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh + - chmod +x miniconda.sh + - ./miniconda.sh -b + - export PATH=/home/travis/miniconda/bin:$PATH + - conda update --yes conda + - conda install --yes matplotlib script: - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi - #- julia -e 'Pkg.init(); Pkg.clone(pwd()); Pkg.resolve(); Pkg.add("Winston")' - #- xvfb-run julia --code-coverage=all -e 'cd(Pkg.dir("Weave", "test")); include("winston_formats.jl")' - julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("Weave")' - xvfb-run julia -e 'Pkg.test("Weave", coverage=true)' after_success: diff --git a/test/cache_test.jl b/test/cache_test.jl index aad82bf..33b2410 100644 --- a/test/cache_test.jl +++ b/test/cache_test.jl @@ -20,12 +20,14 @@ Weave.weave("documents/chunk_cache.noweb", plotlib=nothing, cache=:user); cached_result = readall(open(out)) @test result == cached_result -using Gadfly -isdir("documents/cache") && rm("documents/cache", recursive = true) -#Caching with Gadfly -weave("documents/gadfly_formats_test.txt", doctype="tex", plotlib="gadfly", cache=:all) -result = readall(open("documents/gadfly_formats_test.tex")) -rm("documents/gadfly_formats_test.tex") -weave("documents/gadfly_formats_test.txt", doctype="tex", plotlib="gadfly", cache=:all) -cached_result = readall(open("documents/gadfly_formats_test.tex")) -@test result == cached_result +if VERSION.minor == 3 + using Gadfly + isdir("documents/cache") && rm("documents/cache", recursive = true) + #Caching with Gadfly + weave("documents/gadfly_formats_test.txt", doctype="tex", plotlib="gadfly", cache=:all) + result = readall(open("documents/gadfly_formats_test.tex")) + rm("documents/gadfly_formats_test.tex") + weave("documents/gadfly_formats_test.txt", doctype="tex", plotlib="gadfly", cache=:all) + cached_result = readall(open("documents/gadfly_formats_test.tex")) + @test result == cached_result +end diff --git a/test/gadfly_formats.jl b/test/gadfly_formats.jl index ebd3569..a710077 100644 --- a/test/gadfly_formats.jl +++ b/test/gadfly_formats.jl @@ -44,3 +44,8 @@ weave("documents/gadfly_formats_test.txt", doctype="asciidoc", plotlib="gadfly", result = readall(open("documents/output/gadfly_formats_test.txt")) ref = readall(open("documents/output/gadfly_formats_test_ref.txt")) @test result == ref + +weave("documents/gadfly_markdown_test.jmd", doctype="github",plotlib="gadfly", informat="markdown") +result = readall(open("documents/gadfly_markdown_test.md")) +ref = readall(open("documents/gadfly_markdown_test_ref.md")) +@test result == ref diff --git a/test/runtests.jl b/test/runtests.jl index 7d6b4ad..38b9851 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -12,16 +12,14 @@ include("chunk_options.jl") info("Test: Caching") include("cache_test.jl") -info("Test: Weaving with Winston") -include("winston_formats.jl") -info("Test: Weaving with Gadfly") -include("gadfly_formats.jl") +if VERSION.minor == 3 + info("Test: Weaving with Winston") + include("winston_formats.jl") -weave("documents/gadfly_markdown_test.jmd", doctype="github",plotlib="gadfly", informat="markdown") -result = readall(open("documents/gadfly_markdown_test.md")) -ref = readall(open("documents/gadfly_markdown_test_ref.md")) -@test result == ref + info("Test: Weaving with Gadfly") + include("gadfly_formats.jl") +end info("Test: Weaving with PyPlot") include("pyplot_formats.jl")