AT_TESTED([rpm rpmbuild rpmquery]) m4_define([RPMDB_INIT],[[ run rpm \ --root="${abs_builddir}"/testing \ --initdb ]]) m4_define([RPMDB_CLEAR],[[ rm -rf "${abs_builddir}"/testing`run rpm --eval '%_dbpath'`/* ]]) m4_define([RPMPY_RUN],[ cat << EOF > test.py import rpm, sys def myprint(msg = ''): sys.stdout.write('%s\n' % msg) $1 EOF python test.py ]) m4_define([RPMPY_CHECK],[ AT_SETUP([$1]) AT_KEYWORDS([python]) AT_CHECK([RPMPY_RUN([[$2]])], [], [$3], [$4]) AT_CLEANUP ]) AT_INIT