Skip to content

Commit

Permalink
[backend] one more testcase for suse kernel constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Mar 7, 2014
1 parent 1478ca5 commit 5809930
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
29 changes: 29 additions & 0 deletions src/backend/testdata/constraint/kernel
Expand Up @@ -33,5 +33,34 @@
</disk>
</hardware>
</overwrite>

<overwrite>
<conditions>
<arch>i586</arch>
<arch>x86_64</arch>
<package>kernel-obs-qa</package>
</conditions>
<sandbox>kvm</sandbox>
<hardware>
<processors>1</processors>
<disk>
<size unit="G">1</size>
</disk>
</hardware>
</overwrite>

<overwrite>
<conditions>
<package>kernel-obs-qa-xen</package>
</conditions>
<sandbox>xen</sandbox>
<hardware>
<processors>1</processors>
<disk>
<size unit="G">1</size>
</disk>
</hardware>
</overwrite>

</constraints>

14 changes: 12 additions & 2 deletions src/backend/testdata/test_dispatcher
Expand Up @@ -25,7 +25,7 @@ function td()

if ./bs_dispatch --test-constraints "$package" "$arch" $worker "$srcconstraint" "$prjconfconstraint"; then
if [ $expected != "true" ]; then
echo "Failed for $package $arch $worker $srcconstraint $prjconfconstraint"
echo "Failed $testname for $package $arch $worker $srcconstraint $prjconfconstraint"
FAILS="$FAILS $testname"
fi
echo -n .
Expand All @@ -35,7 +35,7 @@ function td()
exit 2
fi
if [ $expected != "false" ]; then
echo "Failed for $package $arch $worker $srcconstraint $prjconfconstraint"
echo "Failed $testname for $package $arch $worker $srcconstraint $prjconfconstraint"
FAILS="$FAILS $testname"
fi
echo -n .
Expand All @@ -52,6 +52,16 @@ td simple06 false "kernel-default" aarch64 small kernel
td simple07 true "kernel-default" aarch64 medium kernel
td simple08 true "kernel-default" aarch64 large kernel

# simple source constraints like used by suse kernel
td sandbox31 false "kernel-obs-qa" i586 medium kernel
td sandbox32 true "kernel-obs-qa" i586 large kernel
td sandbox33 false "kernel-obs-qa" i586 medium kernel
td sandbox34 true "kernel-obs-qa" i586 large kernel
td sandbox35 true "kernel-obs-qa-xen" i586 medium kernel
td sandbox36 false "kernel-obs-qa-xen" i586 large kernel
td sandbox37 true "kernel-obs-qa-xen" i586 medium kernel
td sandbox38 false "kernel-obs-qa-xen" i586 large kernel

# simple prjconf constraints for processor numbers and disk storage
td simple11 true "kernel" i586 large "" kernel-default
td simple12 false "kernel" i586 small "" kernel-default
Expand Down
2 changes: 1 addition & 1 deletion src/backend/testdata/workerinfo/medium
@@ -1,5 +1,5 @@

<worker hostarch="i586" workerid="small">
<worker hostarch="i586" workerid="medium">
<buildarch>i586</buildarch>
<hostlabel>medium_label</hostlabel>
<hostlabel>junk_label</hostlabel>
Expand Down

0 comments on commit 5809930

Please sign in to comment.