mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-28 03:07:43 +00:00
This sets us up to run all common/ and resources/ tests from a single script, common/build.sh. This test will be run on each platform for all changes made in common/ or resources/. Also renamed files and paths for consistency in resources/ and updated tests accordingly.
41 lines
923 B
Bash
Executable file
41 lines
923 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
## START STANDARD BUILD SCRIPT INCLUDE
|
|
# adjust relative paths as necessary
|
|
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
|
|
. "${THIS_SCRIPT%/*}/../../../../../resources/build/build-utils.sh"
|
|
# END STANDARD BUILD SCRIPT INCLUDE
|
|
|
|
cd "$THIS_SCRIPT_PATH"
|
|
|
|
# Test builder_describe_outputs and dependencies
|
|
|
|
project=dep
|
|
|
|
builder_describe "$project test module" \
|
|
clean \
|
|
configure \
|
|
build
|
|
|
|
builder_parse "$@"
|
|
|
|
if builder_is_child_build; then
|
|
builder_die "FAIL: builder_is_child_build should return false but was $_builder_is_child for a dependency script"
|
|
else
|
|
builder_echo "PASS: builder_is_child_build is false ($_builder_is_child) for the dependency script"
|
|
fi
|
|
|
|
function test_action() {
|
|
local action=$1
|
|
|
|
if builder_start_action $action; then
|
|
touch ../$project.$action
|
|
builder_finish_action success $action
|
|
fi
|
|
}
|
|
|
|
test_action clean
|
|
test_action configure
|
|
test_action build
|