2009-06-18 3 views
0

를 인식 :티치 이맥스는 테스트 케이스도 실패한 경우가 Boost.Test의 출력 Boost.Test 오류를

 
bjam toolset=msvc 
...patience... 
...found 1287 targets... 
...updating 4 targets... 
compile-c-c++ ..\bin\test\Function.test\msvc-8.0\debug\link-static\threading-multi\Function.obj 
Function.cpp 
msvc.link ..\bin\test\Function.test\msvc-8.0\debug\link-static\threading-multi\Function.exe 
msvc.manifest ..\bin\test\Function.test\msvc-8.0\debug\link-static\threading-multi\Function.exe 
testing.capture-output ..\bin\test\Function.test\msvc-8.0\debug\link-static\threading-multi\Function.run 
====== BEGIN OUTPUT ====== 
Running 1 test case... 
Function.cpp(26): fatal error in "FunctionConstruction": critical check pf->Name() == "F13" failed [F1 != F13] 

*** 1 failure detected in test suite "foo_test" 
Detected memory leaks! 
Dumping objects -> 
{235} normal block at 0x003A7C88, 32 bytes long. 
Data: 00 00 00 00 CD CD CD CD 54 31 00 CD CD CD CD CD 
{234} normal block at 0x003A7E00, 96 bytes long. 
Data: 00 00 00 00 CD CD CD CD 54 31 00 CD CD CD CD CD 
{233} normal block at 0x003A7D88, 76 bytes long. 
Data: F4 D9 45 00 00 00 00 00 CD CD CD CD 00 7E 3A 00 
Object dump complete. 

EXIT STATUS: 201 
====== END OUTPUT ====== 

MSVC 제대로 그래서 클릭하고 점프 코드에 배치 두배로 할 수있다이 오류를 구문 분석합니다. 하지만 이맥스는이 출력을 분석 할 수 없습니다. 그것을 가르치는 방법?

답변

3

'compilation-error-regexp-alist, 'compilation-error-regexp-alist-alist, 'compilation-directory-matcher과 같은 변수를 사용자 정의해야합니다.

첫 번째 문자 인 'compilation-error-regexp-alist은 컴파일 모드에서 두 번째 변수`compilation-error-regexp-alist-alist '에서 무엇을 검색 할 것인지를 알려주는 기호 목록 일 뿐이므로 부스트를 위해 무언가를 추가하는 것이 좋습니다.

(add-to-list 'compilation-error-regexp-alist 'boost) 

그런 다음, 그 일을하기 위해, 당신은 두 번째 변수 'compilation-error-regexp-alist-alist에 목록을 추가해야합니다. 이것이 까다로워지기 시작하는 곳입니다. 당신은 정규 표현식의 권리를 얻기 위해 첫 번째 변수에 대한 설명서를 참조해야합니다,하지만 뭔가 같은 수 있습니다 :

(add-to-list 'compilation-error-regexp-alist-alist 
     '(boost 
      "^\\(.*\\)(\\([0-9]+\\)): fatal error in" 1 2)) 
정규 표현식 오류 라인을 일치

,은 1, 2 지정 하위 식을 지정 파일 이름과 줄 번호. 지정할 수있는 다른 사항이 있습니다 (문서 참조).

물론 기존의 정규 표현식 중 하나가 해당 형식과 일치 할 것으로 확신하기 때문에 위의 두 설정은 필요하지 않습니다. 문제는 실제로 디렉터리 추적과 함께 존재합니다.

마지막 변수 인 'compilation-directory-matcher'는 다음 오류 트랙에서 파일을 찾을 수있는 곳입니다. 따라서 적절하게 업데이트해야합니다. 그것은 부스트 ​​테스트가 다소 표준 "Entering directory ..."에서 나오는 것처럼 보이지 않지만 Emacs가 찾는 정보는 컴파일 라인에있는 것처럼 보입니다 ...

부스트 사용자 메일 링리스트는 누군가가이 문제를 해결했는지 확인합니다. 메일 링리스트는 here입니다.