mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-22 14:54:33 +00:00
Move external tests files to tests/external/
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
/gb-starter-kit/
|
||||
/LADX-Disassembly/
|
||||
/libbet/
|
||||
/pokecrystal/
|
||||
/pokered/
|
||||
/SameBoy/
|
||||
/ucity/
|
||||
+4
-4
@@ -28,15 +28,15 @@ endforeach()
|
||||
set_tests_properties(rgbgfx PROPERTIES REQUIRED_FILES "$<TARGET_FILE:rgbgfx>;$<TARGET_FILE:randtilegen>;$<TARGET_FILE:rgbgfx_test>")
|
||||
|
||||
add_test(NAME fetch-test-deps
|
||||
COMMAND bash -- fetch-test-deps.sh --only-free
|
||||
COMMAND bash -- external/fetch-repos.sh --only-free
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set_tests_properties(fetch-test-deps PROPERTIES FIXTURES_SETUP "free-repos"
|
||||
LABELS "external")
|
||||
add_test(NAME fetch-nonfree-deps
|
||||
COMMAND bash -- fetch-test-deps.sh
|
||||
COMMAND bash -- external/fetch-repos.sh
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set_tests_properties(fetch-nonfree-deps PROPERTIES FIXTURES_SETUP "external-repos"
|
||||
FIXTURES_REQUIRED "free-repos"
|
||||
set_tests_properties(fetch-nonfree-deps PROPERTIES FIXTURES_SETUP "external-repos" # *All* external repos.
|
||||
FIXTURES_REQUIRED "free-repos" # Sequence after the other to avoid concurrent access.
|
||||
LABELS "external;nonfree")
|
||||
|
||||
file(GLOB ext_projects "external/*.cfg") # This will not be re-computed if a new project is added! You must manually reconfigure.
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# All of the cloned external repos.
|
||||
/*/
|
||||
+4
-5
@@ -50,7 +50,7 @@ case "$actionname" in
|
||||
|
||||
--get-paths)
|
||||
action() {
|
||||
printf "test/%s," "$EXT_TEST_REPO"
|
||||
printf "test/external/%s," "$EXT_TEST_REPO"
|
||||
}
|
||||
;;
|
||||
|
||||
@@ -72,10 +72,9 @@ case "$actionname" in
|
||||
}
|
||||
esac
|
||||
|
||||
# Since each iteration sources variables into the shell itself,
|
||||
# we do that in a subshell so that they don't "leak" out.
|
||||
for cfg in external/*.cfg; do (
|
||||
# The sourced file defines `EXT_TEST_*` variables that get used by `action`.
|
||||
# Each iteration is isolated in a (subshell) so the sourced cfg variables don't "leak" out.
|
||||
for cfg in *.cfg; do (
|
||||
# Sourcing "$cfg" defines `EXT_TEST_*` variables that get used by `action`.
|
||||
. "$cfg"
|
||||
# Only run a nonfree action if nonfree tests are opted into.
|
||||
if ! $EXT_TEST_IS_NONFREE || $nonfree; then
|
||||
Vendored
+6
-5
@@ -6,24 +6,25 @@ export LC_ALL=C
|
||||
# Game Boy release date, 1989-04-21T12:34:56Z (for reproducible test results)
|
||||
export SOURCE_DATE_EPOCH=609165296
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
RGBDS_PATH="RGBDS=../../"
|
||||
|
||||
if [ ! -f "external/$1.cfg" ]; then
|
||||
if [ ! -f "$1.cfg" ]; then
|
||||
echo >&2 'External test file '"$1"'.cfg does not exist'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sourcing "$1.cfg" defines `EXT_TEST_*` variables used below.
|
||||
. "external/$1.cfg"
|
||||
. "$1.cfg"
|
||||
|
||||
if ! cd "$EXT_TEST_REPO"; then
|
||||
echo >&2 'Please fetch test deps before running any external test'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
RGBDS_PATH="RGBDS=../../../"
|
||||
make clean $RGBDS_PATH
|
||||
make -j4 "$EXT_TEST_TARGET" $RGBDS_PATH
|
||||
|
||||
hash="$(sha1sum -b "$EXT_TEST_FILE" | head -c 40)"
|
||||
if [ "$hash" != "$EXT_TEST_HASH" ]; then
|
||||
cat >&2 <<EOM
|
||||
|
||||
Reference in New Issue
Block a user