run.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. #
  3. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  4. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  5. #
  6. if [[ $2 == "--sgx" ]];then
  7. readonly IWASM_CMD="../../../product-mini/platforms/linux-sgx/enclave-sample/iwasm"
  8. else
  9. readonly IWASM_CMD="../../../product-mini/platforms/linux/build/iwasm"
  10. fi
  11. readonly WAMRC_CMD="../../../wamr-compiler/build/wamrc"
  12. if [[ $1 != "--aot" ]]; then
  13. echo "============> run test_aes.wasm"
  14. if [[ $1 != "--multi-tier-jit" ]]; then
  15. ${IWASM_CMD} --heap-size=16384 test_aes.wasm
  16. else
  17. echo "============> run test_aes.wasm with interp"
  18. ${IWASM_CMD} --heap-size=16384 --interp test_aes.wasm
  19. echo "============> run test_aes.wasm with fast-jit"
  20. ${IWASM_CMD} --heap-size=16384 --fast-jit test_aes.wasm
  21. echo "============> run test_aes.wasm with llvm-jit"
  22. ${IWASM_CMD} --heap-size=16384 --llvm-jit test_aes.wasm
  23. echo "============> run test_aes.wasm with multi-tier-jit"
  24. ${IWASM_CMD} --heap-size=16384 --multi-tier-jit test_aes.wasm
  25. fi
  26. else
  27. echo "============> compile test_aes.wasm to aot"
  28. [[ $2 == "--sgx" ]] && ${WAMRC_CMD} -sgx -o test_aes.aot test_aes.wasm \
  29. || ${WAMRC_CMD} -o test_aes.aot test_aes.wasm
  30. echo "============> run test_aes.aot"
  31. ${IWASM_CMD} --heap-size=16384 test_aes.aot
  32. fi