test.sh 767 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # USM test exec: run the meson-wired USM suite (.usmignore semantics,
  3. # dataPackage validation, usm.config parsing) inside an existing build
  4. # directory (passed as $1 by `usm manifest test`).
  5. #
  6. # The environment is scrubbed, not extended:
  7. # - LD_LIBRARY_PATH: a saddle-wide /opt/usm/lib value would silently
  8. # override the build-tree RUNPATH and run the suite against a stale
  9. # installed library.
  10. # - USM_VERBOSE: flips run_install into verbose mode, disabling the
  11. # progress parsing the suite asserts on.
  12. set -e
  13. build_dir=$1
  14. if [ ! -f "${build_dir}/build.ninja" ]; then
  15. echo "test.sh: no meson build directory at ${build_dir} (run the build exec first)" >&2
  16. exit 1
  17. fi
  18. LD_LIBRARY_PATH= USM_VERBOSE= meson test -C "${build_dir}"