--- /dev/null
+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)
--- /dev/null
+#!/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
--- /dev/null
+#
+# 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