hello.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #! /bin/sh
  2. ## Copyright (C) 2017 Jeremiah Orians
  3. ## This file is part of stage0.
  4. ##
  5. ## stage0 is free software: you can redistribute it and/or modify
  6. ## it under the terms of the GNU General Public License as published by
  7. ## the Free Software Foundation, either version 3 of the License, or
  8. ## (at your option) any later version.
  9. ##
  10. ## stage0 is distributed in the hope that it will be useful,
  11. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ## GNU General Public License for more details.
  14. ##
  15. ## You should have received a copy of the GNU General Public License
  16. ## along with stage0. If not, see <http://www.gnu.org/licenses/>.
  17. set -x
  18. ./bin/M1 --little-endian --architecture ppc64le -f test/test13/hello.M1 -o test/test13/hello.hex2 || exit 1
  19. ./bin/hex2 --little-endian --architecture ppc64le --base-address 0x10000 -f elf_headers/elf64-PPC64LE.hex2 -f test/test13/hello.hex2 -o test/results/test13-binary || exit 2
  20. if [ "$(./bin/get_machine ${GET_MACHINE_FLAGS})" = "ppc64le" ] && [ "$(./bin/get_machine ${GET_MACHINE_OS_FLAGS} --os)" = "Linux" ]
  21. then
  22. ./test/results/test13-binary > test/test13/proof
  23. [ $? = 42 ] || exit 3
  24. . ./sha256.sh
  25. out=$(sha256_check test/test13/proof.answer)
  26. [ "$out" = "test/test13/proof: OK" ] || exit 4
  27. fi
  28. exit 0