Skip to content

test_check_*_version() errors  #2513

@leofang

Description

@leofang

See, e.g., https://jenkins.preferred.jp/job/chainer/job/cupy_pr/417/TEST=cupy-py2,label=mn1-p100/testReport/junit/tests.install_tests.test_build/TestCheckVersion/test_check_cuda_version/ from #1941:

self = <install_tests.test_build.TestCheckVersion testMethod=test_check_cuda_version>

    def setUp(self):
        self.compiler = ccompiler.new_compiler()
        sysconfig.customize_compiler(self.compiler)
>       self.settings = build.get_compiler_setting()
E       TypeError: get_compiler_setting() takes exactly 1 argument (0 given)

self       = <install_tests.test_build.TestCheckVersion testMethod=test_check_cuda_version>

tests/install_tests/test_build.py:15: TypeError

due to the new use_hip argument, supposedly introduced in #1094. This patch should fix it:

diff --git a/tests/install_tests/test_build.py b/tests/install_tests/test_build.py
index d3fb77c..f90685b 100644
--- a/tests/install_tests/test_build.py
+++ b/tests/install_tests/test_build.py
@@ -12,7 +12,7 @@ class TestCheckVersion(unittest.TestCase):
     def setUp(self):
         self.compiler = ccompiler.new_compiler()
         sysconfig.customize_compiler(self.compiler)
-        self.settings = build.get_compiler_setting()
+        self.settings = build.get_compiler_setting(False)
 
     @pytest.mark.gpu
     def test_check_cuda_version(self):

Let me add that it is amazing the HIP-support PR only caused this single error! Job well done, @okuta! I'm looking forward to testing this whole new feature soon.

cc: @niboshi

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions