Hi. If you absolutely need to run the tests during the build, maybe a workaround would be to add a build-depends on a package which changes the kernel value for you in its postinst (as I guess that the ordinary user used to build packages would not be able to do that).
Yes, it would be a little bit hackish, and I don't know of any package doing anything similar. Thanks.