I am running it from a batch script, containing the command line I posted above:
stage("Run Unit Tests") {
steps {
bat 'Tools\\BuildSystem\\run_unit_tests.bat'
}
}
Your problem might be that your Jenkins build machine needs to have a DirectX 11 GPU, and also perhaps a user session open. -NullRHI should solve this, I think, but it crashed on UE4.20, I had to backport a fix from 4.21 to have it work