diff --git a/.travis.yml b/.travis.yml index dda8fda..fbf998b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,13 @@ language: julia +os: + - linux + - osx julia: - release - nightly -#notifications: -# email: false +notifications: + email: false +# uncomment the following lines to override the default test script #script: -# - julia -e 'Pkg.clone(pwd())' -# - julia -e 'Pkg.build("$name")' -# - if [ -f test/runtests.jl ]; then julia --check-bounds=yes --code-coverage test/runtests.jl; fi -script: - - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi - - julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("JuliaFEM"); Pkg.test("JuliaFEM"; coverage=true)' -after_success: - - julia -e 'cd(Pkg.dir("JuliaFEM")); Pkg.add("Coverage"); using Coverage; >Coveralls.submit(Coveralls.process_folder())' +# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi +# - julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("JuliaFEM"); Pkg.test("JuliaFEM"; coverage=true)' diff --git a/test/old-runtests.jl b/test/old-runtests.jl new file mode 100644 index 0000000..a77d56a --- /dev/null +++ b/test/old-runtests.jl @@ -0,0 +1,19 @@ +# This file is a part of Julia. License is MIT: http://julialang.org/license + +include("choosetests.jl") +tests, net_on = choosetests(ARGS) +cd(dirname(@__FILE__)) do + n = 1 + if net_on + n = min(8, CPU_CORES, length(tests)) + n > 1 && addprocs(n; exeflags=`--check-bounds=yes`) + blas_set_num_threads(1) + end + + @everywhere include("testdefs.jl") + + reduce(propagate_errors, nothing, pmap(runtests, tests; err_retry=false, err_stop=true)) + + @unix_only n > 1 && rmprocs(workers(), waitfor=5.0) + println(" \033[32;1mSUCCESS\033[0m") +end diff --git a/test/runtests.jl b/test/runtests.jl index a77d56a..22a61a2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,19 +1,8 @@ -# This file is a part of Julia. License is MIT: http://julialang.org/license +using JuliaFEM +using Base.Test -include("choosetests.jl") -tests, net_on = choosetests(ARGS) -cd(dirname(@__FILE__)) do - n = 1 - if net_on - n = min(8, CPU_CORES, length(tests)) - n > 1 && addprocs(n; exeflags=`--check-bounds=yes`) - blas_set_num_threads(1) - end +# write your own tests here +@test 1 == 1 - @everywhere include("testdefs.jl") - reduce(propagate_errors, nothing, pmap(runtests, tests; err_retry=false, err_stop=true)) - - @unix_only n > 1 && rmprocs(workers(), waitfor=5.0) - println(" \033[32;1mSUCCESS\033[0m") -end +@test_approx_eq 1.0 1.0