fixing resources releasing

This commit is contained in:
Evgeny
2018-01-22 17:02:46 -06:00
orang tua c00a0feb36
melakukan 9a9418ad16
14 mengubah file dengan 145 tambahan dan 323 penghapusan
+8 -6
Melihat File
@@ -31,7 +31,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ctrl/test_hsa.h"
#include "util/test_assert.h"
template <class Kernel, class Test> bool RunKernel(int argc, char* argv[]) {
template <class Kernel, class Test> bool RunKernel(int argc, char* argv[], int count = 1) {
bool ret_val = false;
// Create test kernel object
@@ -58,11 +58,13 @@ template <class Kernel, class Test> bool RunKernel(int argc, char* argv[]) {
}
// Run test kernel
ret_val = test_aql->Run();
if (ret_val == false) {
std::cerr << "Error in running the test kernel" << std::endl;
TEST_ASSERT(ret_val);
return false;
for (int i = 0; i < count; ++i) {
ret_val = test_aql->Run();
if (ret_val == false) {
std::cerr << "Error in running the test kernel" << std::endl;
TEST_ASSERT(ret_val);
return false;
}
}
// Verify the results of the execution