(testbin, arch=None, os_str=None)
| 19 | # 'helloworld' -> '{BN_SOURCE_ROOT}\public\debugger\test\binaries\Windows-x64\helloworld.exe' (windows) |
| 20 | # 'helloworld' -> '{BN_SOURCE_ROOT}/public/debugger/test/binaries/Darwin/arm64/helloworld' (linux, macOS) |
| 21 | def name_to_fpath(testbin, arch=None, os_str=None): |
| 22 | if arch is None: |
| 23 | arch = platform.machine() |
| 24 | |
| 25 | if os_str is None: |
| 26 | os_str = platform.system() |
| 27 | |
| 28 | if os_str == 'Windows' and not testbin.endswith('.exe'): |
| 29 | testbin += '.exe' |
| 30 | |
| 31 | signed = '' |
| 32 | if os_str == 'Darwin': |
| 33 | signed = '-signed' |
| 34 | |
| 35 | base_path = os.path.dirname(os.path.realpath(__file__)) |
| 36 | path = os.path.realpath(os.path.join(base_path, 'binaries', f'{os_str}-{arch}{signed}', testbin)) |
| 37 | return path |
| 38 | |
| 39 | |
| 40 | def is_wow64(fpath): |
no outgoing calls
no test coverage detected