
This change adds support for the gtests that require input data in the Inputs files. This is done through a new Xcode script phase that runs the scripts/Xcode/prepare-gtest-run-dir.sh script. That script simply copies the contents of all unittests/**/Inputs dirs into ${TARGET_BUILD_DIR}/Inputs before running the test. This change also renames the Xcode 'gtest-for-debugging' to 'gtest-build', and makes the gtest "build and run" target depend on gtest-build. This reduces replication within the targets. gtest .c/.cpp files now should only be added to the gtest-build target. llvm-svn: 281913
11 lines
325 B
Bash
Executable File
11 lines
325 B
Bash
Executable File
#!/bin/bash
|
|
|
|
RUNTIME_INPUTS_DIR="${TARGET_BUILD_DIR}/Inputs"
|
|
echo "Making runtime Inputs directory: $RUNTIME_INPUTS_DIR"
|
|
mkdir -p "$RUNTIME_INPUTS_DIR"
|
|
|
|
for input_dir in $(find unittests -type d -name Inputs); do
|
|
echo "Copying $input_dir into $RUNTIME_INPUTS_DIR"
|
|
cp -r "${input_dir}"/* "${RUNTIME_INPUTS_DIR}/"
|
|
done
|