fix demotest

This commit is contained in:
Roman Fomin 2024-03-05 13:23:15 +07:00
parent 557f3026ed
commit f475045631
2 changed files with 6 additions and 3 deletions

View File

@ -27,7 +27,7 @@ jobs:
shell: bash shell: bash
- name: macOS Clang - name: macOS Clang
os: macos-14 os: macos-latest
compiler: clang compiler: clang
shell: bash shell: bash

View File

@ -4,7 +4,7 @@ import sys
import shutil import shutil
import subprocess import subprocess
import urllib.request import urllib.request
from pathlib import Path from pathlib import Path, PurePath, PureWindowsPath
from zipfile import ZipFile from zipfile import ZipFile
from argparse import ArgumentParser from argparse import ArgumentParser
@ -87,7 +87,10 @@ def compare_output(record):
return True return True
def run_program(args): def run_program(args):
source_port = Path(args.source_port).resolve() source_port = PurePath(args.source_port)
if type(source_port) is PureWindowsPath:
source_port = source_port.with_suffix('.exe')
source_port = Path(source_port).resolve()
if not source_port.exists(): if not source_port.exists():
sys.exit("Doom port is not found.") sys.exit("Doom port is not found.")