summaryrefslogtreecommitdiff
path: root/tests/local.at
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-12 15:17:20 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-12 15:17:20 +0900
commit7df2385c2f6c93f96e00bc87f2086066cae89ecc (patch)
tree79d5c20a494622eb084de831a2a51530cd421e33 /tests/local.at
parentb7a3bffb8e0341b7e4ef69def268bca3a7f279ff (diff)
downloadrpm-tizen_2.2.tar.gz
rpm-tizen_2.2.tar.bz2
rpm-tizen_2.2.zip
Diffstat (limited to 'tests/local.at')
-rw-r--r--tests/local.at30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/local.at b/tests/local.at
new file mode 100644
index 0000000..7ee8060
--- /dev/null
+++ b/tests/local.at
@@ -0,0 +1,30 @@
+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