KhronosGroup / WebCL-conformance

WebCL conformance tests
20 stars 15 forks source link

INVALID_CONTEXT test cases unnecessarily skipped on most systems #69

Closed toaarnio closed 10 years ago

toaarnio commented 10 years ago

The following pattern is repeating throughout the test suite:

// Testing for exception "INVALID_CONTEXT"
var webCLPlatform = wtu.getPlatform();
var devices = wtu.getDevices(webCLPlatform, webcl.DEVICE_TYPE_ALL);
if (devices.length > 1) {
  // create contexts on two different devices, try to use them
  // interchangeably, and check that INVALID_CONTEXT is thrown
}

The tests inside the if clause will get skipped if there's only one device on the platform, which is the typical situation on Windows and Linux systems.

Luckily there's an easy solution: The contexts don't need to be on different devices. You can create two separate contexts on the same device and keep the rest of the code as it is.

shilpashri commented 10 years ago

r https://github.com/KhronosGroup/WebCL-conformance/commit/14b3d2fc10902e761031dd4f7ca910b6c3774eb4 ?

shilpashri commented 10 years ago

Fixed by https://github.com/KhronosGroup/WebCL-conformance/commit/2f8ed8b8b2aa967577182bc0211a8837028825c1 . Please review.