{ 0, 0 }
};
+static const char *features[] = {
+#ifdef ENABLE_LINKED_PACKAGES
+ "linked_packages",
+#endif
+#ifdef ENABLE_COMPLEX_DEPS
+ "complex_deps",
+#endif
+ 0
+};
typedef struct strqueue {
char **str;
int prepared = 0;
int closefp = !fp;
int poolflagsreset = 0;
+ int missing_features = 0;
if (!fp && !(fp = fopen(testcase, "r")))
{
else
pool_debug(pool, SOLV_ERROR, "disable: unknown package '%s'\n", pieces[2]);
}
+ else if (!strcmp(pieces[0], "feature"))
+ {
+ int i, j;
+ for (i = 1; i < npieces; i++)
+ {
+ for (j = 0; features[j]; j++)
+ if (!strcmp(pieces[i], features[j]))
+ break;
+ if (!features[j])
+ {
+ pool_debug(pool, SOLV_ERROR, "testcase_read: missing feature '%s'\n", pieces[i]);
+ missing_features++;
+ }
+ }
+ if (missing_features)
+ break;
+ }
else
{
pool_debug(pool, SOLV_ERROR, "testcase_read: cannot parse command '%s'\n", pieces[0]);
}
if (closefp)
fclose(fp);
+ if (missing_features)
+ {
+ solver_free(solv);
+ solv = 0;
+ if (resultflagsp)
+ *resultflagsp = 77; /* hack for testsolv */
+ }
return solv;
}
cmd=$1
dir=$2
-if test -z "$dir"; then
+if test -z "$cmd" -o -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 "failed test: ${tc#$dir/}"
+ $cmd $tc >/dev/null
+ tex=$?
+ tcn="${tc#$dir/} .................................................."
+ tcn="${tcn:0:50}"
+ if test "$tex" -eq 0 ; then
+ echo "$tcn Passed"
+ elif test "$tex" -eq 77 ; then
+ echo "$tcn Skipped"
+ else
+ echo "$tcn***Failed"
ex=1
fi
done