mirror of
https://github.com/facebook/react-native.git
synced 2024-11-22 06:29:46 +00:00
c171a6e157
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/33802 We use to have a couple of tests for the script phases script that were not running during the CI. This diff connect them with the two CI, so that they run together with the other ruby tests. ## Changelog [iOS][Added] - Run script phases tests in CI Reviewed By: fkgozali Differential Revision: D36283211 fbshipit-source-id: 01b257cdc99b0bc196d60d49ac76cf044d61a7e9
30 lines
659 B
Bash
Executable File
30 lines
659 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
set -f
|
|
|
|
basepath=$(dirname "${0}")
|
|
|
|
# shellcheck disable=SC2207
|
|
files=( $(find . -name '*-test.rb') )
|
|
|
|
test_suite="${basepath}/all_tests.rb"
|
|
touch "${test_suite}"
|
|
|
|
echo "require \"test/unit\"" > "${test_suite}"
|
|
echo "discovered the following files:"
|
|
for i in "${files[@]}"
|
|
do
|
|
filename="${i#"${basepath}/"}"
|
|
echo "${filename}"
|
|
echo "require_relative \"${filename}\"" >> "${test_suite}"
|
|
done
|
|
|
|
ruby -Itest "${test_suite}"
|
|
RES=$?
|
|
rm "${test_suite}"
|
|
exit $RES
|