Fix: Kotlin 테스트 실행 시 출력이 표시되지 않는 문제 수정#51
Open
wooongyee wants to merge 1 commit into
Open
Conversation
- 컴파일 프로세스 대신 실행 프로세스를 반환하도록 수정 - execSync로 컴파일을 동기적으로 완료 후 java 프로세스 반환 - C/C++/Rust와 동일한 compileAndRun 패턴 적용
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
작업 내용
작업 설명
문제 상황
기존 코드에서는
kotlinc컴파일 프로세스를 반환하고close이벤트 콜백에서java실행 프로세스를 생성했습니다.이로 인해
runCode함수가 컴파일러 프로세스의 stdout만 리스닝하게 되어, 실제 코틀린 코드의 println 출력을 캡처하지 못했습니다.해결 방법
execSync를 사용하여 컴파일을 먼저 완료java -jar프로세스를 반환runCode가 실행 프로세스의 stdout을 정상적으로 리스닝참고
스크린샷
수정 전 (이슈 발생)
컴파일 에러 발생 및 Actual Output이 표시되지 않음
수정 후 (이슈 해결)
테스트 케이스 정상 실행 및 출력 캡처 성공