summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt9
-rwxr-xr-xtest/runtestcases18
-rw-r--r--test/testcases/sat/mm-packages.repo.gzbin0 -> 120 bytes
-rw-r--r--test/testcases/sat/mm-system.repo.gzbin0 -> 143 bytes
-rw-r--r--test/testcases/sat/mm-test.t17
5 files changed, 44 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644
index 0000000..713c1f7
--- /dev/null
+++ b/test/CMakeLists.txt
@@ -0,0 +1,9 @@
+FOREACH(tcdir testcases libsolv_zypptestcases)
+ IF(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${tcdir}")
+ FILE(GLOB dirs "${CMAKE_CURRENT_SOURCE_DIR}/${tcdir}/*")
+ FOREACH(dir ${dirs})
+ FILE(RELATIVE_PATH myname "${CMAKE_CURRENT_SOURCE_DIR}/${tcdir}" ${dir})
+ ADD_TEST(${myname} ${CMAKE_CURRENT_SOURCE_DIR}/runtestcases ${CMAKE_BINARY_DIR}/tools/testsolv ${dir})
+ ENDFOREACH(dir)
+ ENDIF(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${tcdir}")
+ENDFOREACH(tcdir)
diff --git a/test/runtestcases b/test/runtestcases
new file mode 100755
index 0000000..0764a6a
--- /dev/null
+++ b/test/runtestcases
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+cmd=$1
+dir=$2
+
+if test -z "$dir"; then
+ echo "Usage: runtestcases <cmd> <dir>";
+ exit 1
+fi
+
+ex=0
+for tc in $(find $dir -name \*.t) ; do
+ if ! $cmd $tc > /dev/null ; then
+ echo "${tc#$dir} failed"
+ ex=1
+ fi
+done
+exit $ex
diff --git a/test/testcases/sat/mm-packages.repo.gz b/test/testcases/sat/mm-packages.repo.gz
new file mode 100644
index 0000000..fd4aa08
--- /dev/null
+++ b/test/testcases/sat/mm-packages.repo.gz
Binary files differ
diff --git a/test/testcases/sat/mm-system.repo.gz b/test/testcases/sat/mm-system.repo.gz
new file mode 100644
index 0000000..ef1ac5f
--- /dev/null
+++ b/test/testcases/sat/mm-system.repo.gz
Binary files differ
diff --git a/test/testcases/sat/mm-test.t b/test/testcases/sat/mm-test.t
new file mode 100644
index 0000000..ea7b574
--- /dev/null
+++ b/test/testcases/sat/mm-test.t
@@ -0,0 +1,17 @@
+#
+# testcase to check enabling/disabling of learnt rules
+#
+repo system 0 susetags mm-system.repo.gz
+repo test 0 susetags mm-packages.repo.gz
+system i686 rpm system
+job install provides E
+job verify all packages
+result transaction,problems <inline>
+#>erase D-1.0-1.noarch@system
+#>erase D2-1.0-1.noarch@system
+#>problem a3755a16 info package E-2.0-1.noarch requires foo, but none of the providers can be installed
+#>problem a3755a16 solution 6d40bce1 deljob install provides E
+#>problem a3755a16 solution c06ed43e erase D-1.0-1.noarch@system
+#>problem a3755a16 solution c8a04f77 erase D2-1.0-1.noarch@system
+#>upgrade A-1.0-1.noarch@system A-2.0-1.noarch@test
+#>upgrade A2-1.0-1.noarch@system A2-2.0-1.noarch@test