run_sim.sh 427 B

123456789101112131415161718
  1. #!/bin/bash
  2. # Quit if any command produces an error.
  3. set -e
  4. # Build and run the CHRE simulator.
  5. CHRE_HOST_OS=`uname`
  6. if [[ $CHRE_HOST_OS == 'Darwin' ]]; then
  7. JOB_COUNT=`sysctl -n hw.ncpu`
  8. else
  9. JOB_COUNT=$((`grep -c ^processor /proc/cpuinfo`))
  10. fi
  11. # Export the variant Makefile.
  12. export CHRE_VARIANT_MK_INCLUDES=variant/simulator/variant.mk
  13. make google_x86_linux_debug -j$JOB_COUNT
  14. ./out/google_x86_linux_debug/libchre ${@:1}