Advertisement
_dinsdale

runtest.sh patch

Dec 6th, 2017
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. diff --git a/tests/runtest.sh b/tests/runtest.sh
  2. index 12b0e6d74..5c45fc74f 100755
  3. --- a/tests/runtest.sh
  4. +++ b/tests/runtest.sh
  5. @@ -113,6 +113,10 @@ case $OSName in
  6. libExtension="so"
  7. ;;
  8.  
  9. + FreeBSD)
  10. + libExtension="so"
  11. + ;;
  12. +
  13. NetBSD)
  14. libExtension="so"
  15. ;;
  16. @@ -736,7 +740,9 @@ function run_test {
  17. }
  18.  
  19. # Variables for running tests in the background
  20. -if [ `uname` = "NetBSD" ]; then
  21. +if [ `uname` = "FreeBSD" ]; then
  22. + NumProc=$(getconf NPROCESSORS_ONLN)
  23. +elif [ `uname` = "NetBSD" ]; then
  24. NumProc=$(getconf NPROCESSORS_ONLN)
  25. elif [ `uname` = "Darwin" ]; then
  26. NumProc=$(getconf _NPROCESSORS_ONLN)
  27. @@ -749,6 +755,7 @@ else
  28. NumProc=1
  29. fi
  30. fi
  31. +
  32. ((maxProcesses = $NumProc * 3 / 2)) # long tests delay process creation, use a few more processors
  33.  
  34. ((processCount = 0))
  35. @@ -783,6 +790,7 @@ function waitany {
  36. function get_available_process_index {
  37. local pid
  38. local i=0
  39. +
  40. for (( i=0; i<$maxProcesses; i++ )); do
  41. pid=${processIds[$i]}
  42. if [ -z "$pid" ] || [ "$pid" == "$pidNone" ]; then
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement