mirror of https://github.com/trapexit/mergerfs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
561 B
32 lines
561 B
#!/bin/sh
|
|
|
|
PWD=$(pwd)
|
|
BASEPATH="${PWD}/${0%/*}"
|
|
|
|
CC=${CC:-cc}
|
|
OUTPUT="/dev/null"
|
|
|
|
echo "#ifndef CONFIG_H_INCLUDED"
|
|
echo "#define CONFIG_H_INCLUDED"
|
|
echo
|
|
|
|
IFS=
|
|
for file in "${BASEPATH}/tests/"*.c
|
|
do
|
|
binary="${file%.c}"
|
|
basename=$(basename ${binary})
|
|
|
|
${CC} -o "${binary}" "${file}" 1>&2
|
|
if [ $? -eq 0 ]; then
|
|
STDOUT=$(${binary})
|
|
if [ "${STDOUT}" != "" ]; then
|
|
echo "#define ${basename} ${STDOUT}"
|
|
else
|
|
echo "#define ${basename}"
|
|
fi
|
|
rm -f "${binary}"
|
|
fi
|
|
done
|
|
|
|
echo
|
|
echo "#endif"
|