Exemplo n.º 1
0
 def test_wrapper_args0001(self, platform):
     vm_def = PythonVMDef('/dummy/bin/python')
     vm_def.set_platform(platform)
     wrapper_filename = "abcdefg.dash"
     got = vm_def._wrapper_args(wrapper_filename)
     expect = ['/usr/bin/sudo', '-u', 'root', '/usr/bin/nice', '-n', '-20',
               '/usr/bin/sudo', '-u', 'krun', '/bin/dash', wrapper_filename]
     assert got == expect
Exemplo n.º 2
0
 def test_wrapper_args0001(self, platform):
     vm_def = PythonVMDef('/dummy/bin/python')
     vm_def.set_platform(platform)
     wrapper_filename = "abcdefg.dash"
     got = vm_def._wrapper_args(wrapper_filename)
     expect = [
         '/usr/bin/sudo', '-u', 'root', '/usr/bin/nice', '-n', '-20',
         '/usr/bin/sudo', '-u', 'krun', DASH, wrapper_filename
     ]
     assert got == expect
Exemplo n.º 3
0
    def test_wrapper_args0002(self, platform):
        # Pinning isn't supported on OpenBSD, so it should make no difference
        platform.config.ENABLE_PINNING = False

        vm_def = PythonVMDef('/dummy/bin/python')
        vm_def.set_platform(platform)
        wrapper_filename = "/tmp/abcdefg.dash"
        got = vm_def._wrapper_args(wrapper_filename)
        expect = ['/usr/local/bin/sudo', '-u', 'root', '/usr/bin/nice', '-n', '-20',
                  '/usr/local/bin/sudo', '-u', 'krun', '/usr/local/bin/dash',
                  wrapper_filename]
        assert got == expect
Exemplo n.º 4
0
    def test_wrapper_args0002(self, platform):
        platform.config.ENABLE_PINNING = False

        vm_def = PythonVMDef('/dummy/bin/python')
        vm_def.set_platform(platform)
        wrapper_filename = "abcdefg.dash"
        got = vm_def._wrapper_args(wrapper_filename)
        expect = [
            '/usr/bin/sudo', '-u', 'root', '/usr/bin/nice', '-n', '-20',
            '/usr/bin/sudo', '-u', 'krun', '/bin/dash', wrapper_filename
        ]
        assert got == expect
Exemplo n.º 5
0
    def test_wrapper_args0002(self, platform):
        # Pinning isn't supported on OpenBSD, so it should make no difference
        platform.config.ENABLE_PINNING = False

        vm_def = PythonVMDef('/dummy/bin/python')
        vm_def.set_platform(platform)
        wrapper_filename = "/tmp/abcdefg.dash"
        got = vm_def._wrapper_args(wrapper_filename)
        expect = [
            '/usr/local/bin/sudo', '-u', 'root', '/usr/bin/nice', '-n', '-20',
            '/usr/local/bin/sudo', '-u', 'krun', '/usr/local/bin/dash',
            wrapper_filename
        ]
        assert got == expect