From f19c7ea05a421e619a17d3c837044d1c3ff66372 Mon Sep 17 00:00:00 2001 From: Tero Frondelius Date: Sat, 20 Jun 2015 22:03:07 +0300 Subject: [PATCH 1/5] Create REQUIRE --- REQUIRE | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 REQUIRE diff --git a/REQUIRE b/REQUIRE new file mode 100644 index 0000000..7571229 --- /dev/null +++ b/REQUIRE @@ -0,0 +1,3 @@ +julia 0.4- +Logging +LightXML From 9ed4d1e2b7e20be92f648494038ebdbbb5a70a60 Mon Sep 17 00:00:00 2001 From: Tero Frondelius Date: Sat, 20 Jun 2015 22:14:04 +0300 Subject: [PATCH 2/5] added Logging in runtests.jl --- test/runtests.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 85595ce..a73fb13 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,6 +1,7 @@ using JuliaFEM using Base.Test - +using Logging +Logging.configure(level=DEBUG) function test_create_model() m = new_model() @@ -81,8 +82,8 @@ function test_print() close(fil) end #@test lines_with_print == Dict() - println("number of lines with print = ", length(lines_with_print)) - println(lines_with_print) + debug("number of lines with print = ", length(lines_with_print)) + debug(lines_with_print) @test length(lines_with_print) == 0 end test_print() @@ -100,7 +101,7 @@ function test_add_element() el2 = Dict("element_type" => 0x6, "node_ids" => [4, 3, 2, 1]) elements = Dict(1 => el1, 2 => el2) add_elements(m, elements) - println(m) + debug(m) @test m.elements["element_type"][1] == 0x6 @test m.elements["connectivity"][1] == [1, 2, 3, 4] end From 09d623eb02756eb7463d3a34c3421450b966bbba Mon Sep 17 00:00:00 2001 From: Tero Frondelius Date: Sat, 20 Jun 2015 22:26:26 +0300 Subject: [PATCH 3/5] Update .travis.yml Testing if the REQUIRE julia 0.4.0 - works --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0fa17e0..eb19a12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,13 @@ language: julia os: - linux julia: -# - release + - release - nightly notifications: email: false script: - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi -# - julia -e 'Pkg.init(); Pkg.clone(pwd()); Pkg.build("JuliaFEM"); run(`ls -al`) ;Pkg.test("JuliaFEM"; coverage=true)' +# - julia -e 'Pkg.init(); Pkg.clone(pwd()); Pkg.build("JuliaFEM"); Pkg.test("JuliaFEM"; coverage=true)' - julia -e 'Pkg.init(); Pkg.clone(pwd()); Pkg.build("JuliaFEM")' after_success: - julia -e 'Pkg.test("JuliaFEM"; coverage=true)' From 4b4074b098f19923b2478be890514b989ef186d0 Mon Sep 17 00:00:00 2001 From: Tero Frondelius Date: Sat, 20 Jun 2015 22:34:16 +0300 Subject: [PATCH 4/5] Adding Docile --- REQUIRE | 1 + src/JuliaFEM.jl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/REQUIRE b/REQUIRE index 7571229..39bd867 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,4 @@ julia 0.4- Logging LightXML +Docile diff --git a/src/JuliaFEM.jl b/src/JuliaFEM.jl index 6599dde..c2e6d42 100644 --- a/src/JuliaFEM.jl +++ b/src/JuliaFEM.jl @@ -1,6 +1,8 @@ # This file is a part of JuliaFEM. License is MIT: https://github.com/ovainola/JuliaFEM/blob/master/README.md module JuliaFEM +VERSION < v"0.4-" && using Docile + export Model, new_model, new_field, get_field, add_nodes, get_nodes, add_elements, get_elements From 9420d76294fd0bc5686b5242fa0b283144fecad2 Mon Sep 17 00:00:00 2001 From: Tero Frondelius Date: Sat, 20 Jun 2015 23:30:33 +0300 Subject: [PATCH 5/5] debug to @debug in order to avoid overhead --- test/runtests.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index a73fb13..d90b93f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,7 @@ using JuliaFEM using Base.Test using Logging -Logging.configure(level=DEBUG) +@Logging.configure(level=DEBUG) function test_create_model() m = new_model() @@ -82,8 +82,8 @@ function test_print() close(fil) end #@test lines_with_print == Dict() - debug("number of lines with print = ", length(lines_with_print)) - debug(lines_with_print) + @debug("number of lines with print = ", length(lines_with_print)) + @debug(lines_with_print) @test length(lines_with_print) == 0 end test_print() @@ -101,7 +101,7 @@ function test_add_element() el2 = Dict("element_type" => 0x6, "node_ids" => [4, 3, 2, 1]) elements = Dict(1 => el1, 2 => el2) add_elements(m, elements) - debug(m) + @debug(m) @test m.elements["element_type"][1] == 0x6 @test m.elements["connectivity"][1] == [1, 2, 3, 4] end