run.sh 652 B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/usr/bin/env bash
  2. # http://redsymbol.net/articles/unofficial-bash-strict-mode/
  3. set -euo pipefail
  4. IFS=$'\n\t'
  5. DIR=$(dirname "$(realpath "$0")")
  6. cd "$DIR" || exit
  7. function fn_main() {
  8. fn_build_rust_bins
  9. fn_multiboot2_integrationtest
  10. fn_multiboot2_header_integrationtest
  11. }
  12. function fn_build_rust_bins() {
  13. cd "bins"
  14. cargo --version
  15. cargo build --release --verbose
  16. cd "$DIR"
  17. }
  18. function fn_multiboot2_integrationtest() {
  19. cd tests/multiboot2
  20. ./build_img.sh
  21. ./run_qemu.sh
  22. cd "$DIR"
  23. }
  24. function fn_multiboot2_header_integrationtest() {
  25. cd tests/multiboot2-header
  26. ./run_qemu.sh
  27. cd "$DIR"
  28. }
  29. fn_main