Node.js Build + Test
빌드 환경
HW
- Ryzen 5 5600X
- DDR4 48GB
Native
- Ubuntu 24.04
- Python 3.12.4
- Make 4.3
- GCC 13.2.0
Docker 가상환경
text 여기에서 Node.js를 위한 dev container 설정 방법을 알려주고 있다.
docker pull nodejs/devcontainer:nightly
docker run -it nodejs/devcontainer:nightly /bin/bash
- Ubuntu 22.04
- Python 3.10.6
- Make 4.3
- GCC 11.3.0
빌드 결과
time make -j10
빌드 자체에서 에러는 안 떴다. 아래에 있는 빌드 시간은 Docker에서 돌렸을 때의 시간인데, native로 돌렸을 때도 아마 비슷하게 나왔던 것 같다.
real 20m18.848s
user 180m33.354s
sys 16m22.906s
테스트 결과
Native
make test-only
Test case 2개에서 에러가 터졌다.
=== release test-net-socket-connect-without-cb ===
Path: parallel/test-net-socket-connect-without-cb
node:events:498
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND localhost
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -3007,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'localhost'
}
Node.js v23.0.0-pre
Command: out/Release/node /home/sendol/programming-projects/node/test/parallel/test-net-socket-connect-without-cb.js
=== release test-tcp-wrap-listen ===
Path: parallel/test-tcp-wrap-listen
(node:377826) internal/test/binding: These APIs are for internal testing only. Do not use them.
(Use `node --trace-warnings ...` to show where the warning was created)
node:events:498
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND localhost
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:170:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -3007,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'localhost'
}
Node.js v23.0.0-pre
Command: out/Release/node --expose-internals /home/sendol/programming-projects/node/test/parallel/test-tcp-wrap-listen.js
[05:18|% 100|+ 4154|- 2]: Done
Failed tests:
out/Release/node /home/sendol/programming-projects/node/test/parallel/test-net-socket-connect-without-cb.js
out/Release/node --expose-internals /home/sendol/programming-projects/node/test/parallel/test-tcp-wrap-listen.js
make[1]: *** [Makefile:312: jstest] 오류 1
make: *** [Makefile:346: test-only] 오류 2
Docker
Docker에서는 모든 test case가 통과했다.
[03:50|% 100|+ 3878|- 0]: Done
All tests passed.
make tooltest
.....
----------------------------------------------------------------------
Ran 5 tests in 0.002s
OK
real 5m59.461s
user 10m28.708s
sys 3m12.673s
Leave a comment