run.sh 1.3 KB

12345678910111213141516171819202122232425262728293031
  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_printf_builtin.wasm"
  14. ${IWASM_CMD} test_printf_builtin.wasm > a.log 2>&1
  15. echo "============> run test_printf_wasi.wasm"
  16. ${IWASM_CMD} test_printf_wasi.wasm > b.log 2>&1
  17. else
  18. echo "============> compile test_printf_builtin.wasm to aot"
  19. [[ $2 == "--sgx" ]] && ${WAMRC_CMD} -sgx -o test_printf_builtin.aot test_printf_builtin.wasm \
  20. || ${WAMRC_CMD} -o test_printf_builtin.aot test_printf_builtin.wasm
  21. echo "============> run test_printf_builtin.aot"
  22. ${IWASM_CMD} test_printf_builtin.aot > a.log 2>&1
  23. echo "============> compile test_printf_wasi.wasm to aot"
  24. [[ $2 == "--sgx" ]] && ${WAMRC_CMD} -sgx -o test_printf_wasi.aot test_printf_wasi.wasm \
  25. || ${WAMRC_CMD} -o test_printf_wasi.aot test_printf_wasi.wasm
  26. echo "============> run test_printf_wasi.aot"
  27. ${IWASM_CMD} test_printf_wasi.aot > b.log 2>&1
  28. fi