The script `create_test_env.sh` was registered in meson as a run target (i.e. to be run manually by `ninja create_test_env`), which is really not useful. So a `ninja test` was outputting various: > You have a writable data folder configured (/gimp/build/dir/app/tests/gimpdir-output/gradients), > but this folder does not exist. Please create the folder or fix your > configuration in the Preferences dialog's 'Folders' section. Unfortunately run target are only meant to be run from command lines and cannot be used in 'depends' argument of test() or 'dependencies' of executable() because "in Meson all dependencies are to output files, not to concepts" (cf. https://github.com/mesonbuild/meson/issues/1793). So instead a run_target() just directly use a run_command() and make this script run during configuration step. Also make the shell script executable as it was not. See also #5666 as it was one of the errors outputted by the reporter's log (though probably not the main issue).
30 lines
1.0 KiB
Bash
Executable File
30 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copy tests resources
|
|
for dir in files gimpdir gimpdir-empty; do
|
|
rm -rf "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/${dir}"
|
|
cp -r "${MESON_SOURCE_ROOT}/${MESON_SUBDIR}/${dir}" \
|
|
"${MESON_BUILD_ROOT}/${MESON_SUBDIR}"
|
|
done
|
|
|
|
# Link to Color icon theme for tests
|
|
IconsRoot="${MESON_SOURCE_ROOT}/icons/Color"
|
|
IconsDirs=$(find "${IconsRoot}" -name [0-9]* -type d -printf '%f\n' | sort -n)
|
|
for dir in ${IconsDirs} ; do
|
|
mkdir "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/${dir}x${dir}" -p
|
|
LnName="${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/${dir}x${dir}/apps"
|
|
rm -rf "${LnName}"
|
|
ln -s "${IconsRoot}/${dir}" "${LnName}"
|
|
done
|
|
|
|
LnName="${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimp-test-icon-theme/hicolor/index.theme"
|
|
rm -rf "${LnName}"
|
|
ln -s "${IconsRoot}/index.theme" "${LnName}"
|
|
|
|
|
|
# Create output dirs
|
|
rm -rf "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimpdir-output"
|
|
for dir in brushes gradients patterns; do
|
|
mkdir -p "${MESON_BUILD_ROOT}/${MESON_SUBDIR}/gimpdir-output/${dir}"
|
|
done
|