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
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
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
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
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