run.sh 437 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. # ./c_api_unit_test --gtest_list_tests
  5. function run_one()
  6. {
  7. local case=$1
  8. valgrind --tool=memcheck --leak-check=yes -v \
  9. ./c_api_unit_test --gtest_filter=CApiTests.${case}
  10. }
  11. function run()
  12. {
  13. valgrind --tool=memcheck --leak-check=yes -v \
  14. ./c_api_unit_test
  15. }
  16. [[ $# -gt 0 ]] && $@ || run