test_options.sh 515 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. set -e
  3. set -x
  4. apt -y install ccache
  5. PATH=/usr/sbin:/usr/bin:/sbin:/bin
  6. export PATH="/usr/lib/ccache:$PATH"
  7. if which nproc >/dev/null; then
  8. SCONS_PARALLEL="-j $(nproc) "
  9. else
  10. SCONS_PARALLEL=""
  11. fi
  12. (
  13. scons --help | grep -B1 'default: True' | grep 'yes|no' | sed 's,:.*,=no,' | grep -v '^gpsd$'
  14. scons --help | grep -B1 'default: False' | grep 'yes|no' | sed 's,:.*,=yes,'
  15. ) | while read option; do
  16. scons --clean
  17. rm -f .sconsign.*.dblite
  18. scons ${SCONS_PARALLEL}${option} build
  19. done