{"action":"created","issue":{"url":"https://api.github.com/repos/gcp/leela-zero/issues/709","repository_url":"https://api.github.com/repos/gcp/leela-zero","labels_url":"https://api.github.com/repos/gcp/leela-zero/issues/709/labels{/name}","comments_url":"https://api.github.com/repos/gcp/leela-zero/issues/709/comments","events_url":"https://api.github.com/repos/gcp/leela-zero/issues/709/events","html_url":"https://github.com/gcp/leela-zero/issues/709","id":290275183,"number":709,"title":"Add Unit tests for FastBoard","user":{"login":"barrybecker4","id":3020163,"avatar_url":"https://avatars1.githubusercontent.com/u/3020163?v=4","gravatar_id":"","url":"https://api.github.com/users/barrybecker4","html_url":"https://github.com/barrybecker4","followers_url":"https://api.github.com/users/barrybecker4/followers","following_url":"https://api.github.com/users/barrybecker4/following{/other_user}","gists_url":"https://api.github.com/users/barrybecker4/gists{/gist_id}","starred_url":"https://api.github.com/users/barrybecker4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrybecker4/subscriptions","organizations_url":"https://api.github.com/users/barrybecker4/orgs","repos_url":"https://api.github.com/users/barrybecker4/repos","events_url":"https://api.github.com/users/barrybecker4/events{/privacy}","received_events_url":"https://api.github.com/users/barrybecker4/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-01-21T14:03:58Z","updated_at":"2018-03-11T14:21:25Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I think there should be unit tests added for many of the classes, but FastBoard seems like a good place to start.\r\n\r\nI don't have much experience adding unit tests for C++ projects, so some guidance would be appreciated. Should we use Google Test, CppUnit, or MS native c++ unit test framework? Probably Google Test is best, unless someone has reasons for something else. I see that there is a gtest directory at the root, but it is empty.\r\n\r\nOnce tests are added, how can they be run automatically when building?"},"comment":{"url":"https://api.github.com/repos/gcp/leela-zero/issues/comments/372119097","html_url":"https://github.com/gcp/leela-zero/issues/709#issuecomment-372119097","issue_url":"https://api.github.com/repos/gcp/leela-zero/issues/709","id":372119097,"user":{"login":"barrybecker4","id":3020163,"avatar_url":"https://avatars1.githubusercontent.com/u/3020163?v=4","gravatar_id":"","url":"https://api.github.com/users/barrybecker4","html_url":"https://github.com/barrybecker4","followers_url":"https://api.github.com/users/barrybecker4/followers","following_url":"https://api.github.com/users/barrybecker4/following{/other_user}","gists_url":"https://api.github.com/users/barrybecker4/gists{/gist_id}","starred_url":"https://api.github.com/users/barrybecker4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrybecker4/subscriptions","organizations_url":"https://api.github.com/users/barrybecker4/orgs","repos_url":"https://api.github.com/users/barrybecker4/repos","events_url":"https://api.github.com/users/barrybecker4/events{/privacy}","received_events_url":"https://api.github.com/users/barrybecker4/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T14:21:25Z","updated_at":"2018-03-11T14:21:25Z","author_association":"CONTRIBUTOR","body":"I also tried following (the steps)[https://github.com/gcp/leela-zero#example-of-compiling-and-running---cmake-macosubuntu] to build and run the unit tests on my Ubuntu VM.\r\nIt went much better.\r\n\r\nWhen I ran cmake, it gave the following warning. Is this a concern?\r\n```\r\nWARNNINGQt is not found, build for `autogtp` and `validation` is disabled\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /home/barry/work/leela-zero/build\r\n```\r\nThe next few steps worked great, but then I got this error when running ./tests\r\n```\r\nRunning main() from gtest_main.cc\r\n[==========] Running 11 tests from 2 test cases.\r\n[----------] Global test environment set-up.\r\nDetecting residual layers...v1...8 channels...1 blocks.\r\nInitializing OpenCL.\r\nOpenCL: clGetPlatformIDs\r\nunknown file: Failure\r\nC++ exception with description \"clGetPlatformIDs\" thrown in auxiliary test code (environments or event listeners).\r\n```\r\nI guess this is not too surprising because Ubuntu cannot access my GTX 1070 card.\r\nSo then I removed the #define USE_OPENCL line from config.h, tried again and all the tests ran and passed!\r\nSo at least now I have a way to work on the tests, although it would be nice if I could get Windows working too."}}
{"actor":{"display_login":"barrybecker4"}}