Make (install from source) python without running tests

后端 未结 4 1995
情深已故
情深已故 2021-02-01 01:33

I compiling python from source tar. All works good, but tests running 2 hours and two times. How to bypass these tests?

0:16:20 [178/405] test_inspect
0:16:26 [1         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-01 02:18

    The configure option --enable-optimizations enables running test suites to generate data for profiling Python. The resulting python binary has better performance in executing python code. Improvements noted here

    From configure help:
    --enable-optimizations  Enable expensive optimizations (PGO, etc). Disabled by default.
    

    From wikipedia

     profile-guided optimisation uses the results of profiling test runs of the instrumented program to optimize the final generated code.
    

    In short, you should not skip tests when using --enable-optimizations as the data required for profiling is generated by running tests. You can run make -j8 build_all followed by make -j8 install to skip tests once(the tests would still run with install target), but that would defeat the purpose. You can instead drop the configure flag for better build times.

提交回复
热议问题