run-docker.sh 467 B

12345678910111213141516171819202122232425
  1. # Small script to run tests for a target (or all targets) inside all the
  2. # respective docker images.
  3. set -ex
  4. run() {
  5. echo $1
  6. docker build -t $1 ci/docker/$1
  7. docker run \
  8. -v `rustc --print sysroot`:/rust:ro \
  9. -v `pwd`:/checkout:ro \
  10. -e CARGO_TARGET_DIR=/tmp/target \
  11. -w /checkout \
  12. --privileged \
  13. -it $1 \
  14. sh ci/run.sh $1
  15. }
  16. if [ -z "$1" ]; then
  17. for d in `ls ci/docker/`; do
  18. run $d
  19. done
  20. else
  21. run $1
  22. fi