testAll.sh 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #!/usr/bin/env bash
  2. #
  3. # testAll.sh [keyword suffix]
  4. #
  5. # Build and compile the wolfssl_test for all platforms.
  6. #
  7. # Supply optional keyword suffix value for log file names.
  8. #
  9. # See testMonitor.sh for USB port settings.
  10. #
  11. # Define ESPIDF_PUTTY_MONITOR to a non-blank value to call putty.
  12. # instead of using `idf.py monitor`
  13. #==============================================================================
  14. # Run shell check to ensure this a good script.
  15. shellcheck "$0"
  16. if [[ "$PATH" == *"rtos-sdk"* ]]; then
  17. echo "Error. Detected rtos-sdk in path."
  18. echo "Need to start with clean path (no prior idf.py setup) "
  19. exit 1
  20. fi
  21. # Save the current PATH to a temporary variable
  22. ORIGINAL_PATH="$PATH"
  23. echo "ORIGINAL_PATH=$PATH"
  24. export ESPIDF_PUTTY_MONITOR="TRUE"
  25. THIS_SUFFIX="$1"
  26. #******************************************************************************
  27. # ESP8266 uses rtos-sdk/v3.4 toolchain. Test this first, as it is slowest.
  28. WRK_IDF_PATH=/mnt/c/SysGCC/esp8266/rtos-sdk/v3.4
  29. #******************************************************************************
  30. # Clear ESP-IDF environment variables to ensure clean start for export.sh
  31. unset ESP_IDF_VERSION
  32. unset ESP_ROM_ELF_DIR
  33. unset IDF_DEACTIVATE_FILE_PATH
  34. unset IDF_PATH
  35. unset IDF_PYTHON_ENV_PATH
  36. unset IDF_TOOLS_EXPORT_CMD
  37. unset IDF_TOOLS_INSTALL_CMD
  38. unset OPENOCD_SCRIPTS
  39. echo "Run ESP8266 export.sh from ${WRK_IDF_PATH}"
  40. # shell check should not follow into the ESP-IDF export.sh
  41. # shellcheck disable=SC1091
  42. . "$WRK_IDF_PATH"/export.sh
  43. # Tensilica
  44. ./testMonitor.sh wolfssl_test esp8266 "$THIS_SUFFIX" || exit 1 # 2715073
  45. #******************************************************************************
  46. # ESP32[-N] uses esp-idf/v5.2 toolchain
  47. WRK_IDF_PATH=/mnt/c/SysGCC/esp32/esp-idf/v5.2
  48. #******************************************************************************
  49. # Restore the original PATH
  50. export PATH="$ORIGINAL_PATH"
  51. # Clear ESP-IDF environment variables to ensure clean start
  52. unset ESP_IDF_VERSION
  53. unset ESP_ROM_ELF_DIR
  54. unset IDF_DEACTIVATE_FILE_PATH
  55. unset IDF_PATH
  56. unset IDF_PYTHON_ENV_PATH
  57. unset IDF_TOOLS_EXPORT_CMD
  58. unset IDF_TOOLS_INSTALL_CMD
  59. unset OPENOCD_SCRIPTS
  60. echo "Run ESP32 export.sh from ${WRK_IDF_PATH}"
  61. # shell check should not follow into the ESP-IDF export.sh
  62. # shellcheck disable=SC1091
  63. . "$WRK_IDF_PATH"/export.sh
  64. # Comment numeric values are recently observed runtime durations.
  65. # Different tests may be enabled for each device.
  66. # This list is not indicative of relative performance.
  67. # Limited hardware acceleration, test slowest first:
  68. ./testMonitor.sh wolfssl_test esp32h2 "$THIS_SUFFIX" || exit 1 # 1424084 esp32h2 COM31" ok
  69. ./testMonitor.sh wolfssl_test esp8684 "$THIS_SUFFIX" || exit 1 # 1065290 esp8684 COM49" ok
  70. # RISC-V
  71. ./testMonitor.sh wolfssl_test esp32c2 "$THIS_SUFFIX" || exit 1 # 1133856 esp32c2 COM79" ok
  72. ./testMonitor.sh wolfssl_test esp32c3 "$THIS_SUFFIX" || exit 1 # 344677 esp32c3 COM35" NT
  73. ./testMonitor.sh wolfssl_test esp32c6 "$THIS_SUFFIX" || exit 1 # 346393 esp32c6 COM36" ok
  74. # Xtensa
  75. ./testMonitor.sh wolfssl_test esp32 "$THIS_SUFFIX" || exit 1 # 259093 esp32 COM9" NT
  76. ./testMonitor.sh wolfssl_test esp32s2 "$THIS_SUFFIX" || exit 1 # 305004 esp32s2 COM30" NT
  77. ./testMonitor.sh wolfssl_test esp32s3 "$THIS_SUFFIX" || exit 1 # 267518 esp32s3 COM24" NT
  78. # Restore the original PATH
  79. export PATH="$ORIGINAL_PATH"
  80. echo "Done!"