mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-20 22:04:32 +00:00
Parallelize build jobs according to CPU count
This commit is contained in:
Vendored
+5
-4
@@ -7,10 +7,11 @@ usage() {
|
||||
cat <<"EOF"
|
||||
Downloads source code of Game Boy project repos used as RGBDS test cases.
|
||||
Options:
|
||||
-h, --help show this help message
|
||||
--only-free download only freely licensed codebases
|
||||
--get-hash print repos' commit hashes instead of downloading them
|
||||
--get-paths print repos' clone paths instead of downloading them
|
||||
-h, --help show this help message
|
||||
--only-free download only freely licensed codebases
|
||||
--only-nonfree download only non-freely licensed codebases
|
||||
--get-hash print repos' commit hashes instead of downloading them
|
||||
--get-paths print repos' clone paths instead of downloading them
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
Vendored
+8
-5
@@ -8,13 +8,16 @@ export SOURCE_DATE_EPOCH=609165296
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ ! -f "$1.cfg" ]; then
|
||||
echo >&2 'External test file '"$1"'.cfg does not exist'
|
||||
NAME="$1"
|
||||
shift # Any remaining arguments get forwarded to `make`.
|
||||
|
||||
if [ ! -f "$NAME.cfg" ]; then
|
||||
echo >&2 'External test file '"$NAME"'.cfg does not exist'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Sourcing "$1.cfg" defines `EXT_TEST_*` variables used below.
|
||||
. "$1.cfg"
|
||||
# Sourcing "$NAME.cfg" defines `EXT_TEST_*` variables used below.
|
||||
. "$NAME.cfg"
|
||||
|
||||
if ! cd "$EXT_TEST_REPO"; then
|
||||
echo >&2 'Please fetch test deps before running any external test'
|
||||
@@ -23,7 +26,7 @@ fi
|
||||
|
||||
RGBDS_PATH="RGBDS=../../../"
|
||||
git clean -fdx # Clean any previous build products so `make` rebuilds everything from scratch.
|
||||
make -j4 "$EXT_TEST_TARGET" $RGBDS_PATH
|
||||
make "$@" "$EXT_TEST_TARGET" $RGBDS_PATH
|
||||
|
||||
hash="$(sha1sum -b "$EXT_TEST_FILE" | head -c 40)"
|
||||
if [ "$hash" != "$EXT_TEST_HASH" ]; then
|
||||
|
||||
Reference in New Issue
Block a user