diff options
author | Nicholas Leonard <nleonard@twitter.com> | 2017-02-07 21:55:50 +0300 |
---|---|---|
committer | Nicholas Leonard <nleonard@twitter.com> | 2017-02-07 21:55:50 +0300 |
commit | 1f83cedcac7043dfd01d9469201685f99d60019c (patch) | |
tree | 8b320ca77d4e6c476f52558b6b02354be1fc226e | |
parent | f6aeb887333e5282b8497c53285bbe379f749f17 (diff) |
prevent graphiz error for continuous integration
-rw-r--r-- | test/test_nngraph.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_nngraph.lua b/test/test_nngraph.lua index 340ab24..0b06f9c 100644 --- a/test/test_nngraph.lua +++ b/test/test_nngraph.lua @@ -348,7 +348,9 @@ function test.test_gradInputType() tester:assert(hidden_a:label():match('DescB') ~= nil) local fg_tmpfile = os.tmpname() local bg_tmpfile = os.tmpname() - graph.dot(net.fg, 'Test', fg_tmpfile) + if not pcall(function() graph.dot(net.fg, 'Test', fg_tmpfile) end) then + return -- prevent graphviz not found error + end graph.dot(net.fg, 'Test BG', bg_tmpfile) local function checkDotFile(tmpfile) |