Allow --cfg on rustpkg test

Closes #10238