if (project.hasProperty("testWithUnknownOS")) {
    tasks.withType(Test) {
        systemProperty "os.arch", "unknown architecture"
        systemProperty "os.name", "unknown operating system"
        systemProperty "os.version", "unknown version"
    }
}