1#!/bin/bash 2# Copyright (c) Meta Platforms, Inc. and affiliates. 3# 4# This source code is licensed under the MIT license found in the 5# LICENSE file in the root directory of this source tree. 6 7set -f 8 9basepath=$(dirname "${0}") 10 11# shellcheck disable=SC2207 12files=( $(find . -name '*-test.rb') ) 13 14test_suite="${basepath}/all_tests.rb" 15touch "${test_suite}" 16 17echo "require \"test/unit\"" > "${test_suite}" 18echo "discovered the following files:" 19for i in "${files[@]}" 20do 21 filename="${i#"${basepath}/"}" 22 echo "${filename}" 23 echo "require_relative \"${filename}\"" >> "${test_suite}" 24done 25 26ruby -Itest "${test_suite}" 27RES=$? 28rm "${test_suite}" 29exit $RES 30