deforaos-job-git-tests: also support autotools

This commit is contained in:
Pierre Pronchery 2022-05-31 08:23:47 +02:00
parent aaac9d4f5a
commit 416fd616f8

View File

@ -71,8 +71,17 @@ _git_tests()
(cd "$tmpdir/repository" && (cd "$tmpdir/repository" &&
$GIT_SUBMODULE init && $GIT_SUBMODULE init &&
$GIT_SUBMODULE update) $GIT_SUBMODULE update)
#generate Makefiles if relevant
if [ -f "$tmpdir/repository/project.conf" ]; then
(cd "$tmpdir/repository" && $CONFIGURE)
elif [ -x "$tmpdir/repository/autogen.sh" ]; then
(cd "$tmpdir/repository" && ./autogen.sh)
elif [ -x "$tmpdir/repository/configure" ]; then
(cd "$tmpdir/repository" && ./configure)
fi
#run tests if available #run tests if available
(cd "$tmpdir" && $CONFIGURE && $MAKE tests) || ret=2 (cd "$tmpdir/repository"
&& $MAKE tests) || ret=2
fi fi
#cleanup #cleanup
$RM -r "$tmpdir" $RM -r "$tmpdir"