mirror of
https://github.com/libretro/cpp-cheat.git
synced 2025-04-06 04:51:33 +00:00
28 lines
501 B
Bash
Executable File
28 lines
501 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
ext='.mk'
|
|
|
|
assert_failed() {
|
|
echo "ASSERT FAILED: $1"
|
|
exit 1
|
|
}
|
|
|
|
assert_make() {
|
|
make -f "$1" || assert_failed "$1"
|
|
}
|
|
|
|
# Tests that run make without any arguments.
|
|
# All asserts are in the makefile itself.
|
|
for t in *"$ext"; do
|
|
assert_make "$t"
|
|
done
|
|
|
|
# Tests that need to pass arguments to makefile.
|
|
# Asserts are made here in the shell.
|
|
t='environment-variables.mk'
|
|
[ "$(my_var='asdf' make -f "$t")" = 'asdf' ] || assert_failed "$t"
|
|
|
|
echo 'ALL ASSERTS PASSED'
|