diff --git a/testing/chameleon_ztesting.c b/testing/chameleon_ztesting.c index 64df983c61973aeee1b95b4ca4708c7d0aeefd2f..dfe7776bf89fa8a11ac8c07a4362a66f452eb776 100644 --- a/testing/chameleon_ztesting.c +++ b/testing/chameleon_ztesting.c @@ -206,7 +206,7 @@ int main (int argc, char **argv) { run_arg_list_t copy = run_arg_list_copy( &(run->args) ); /* Run the warmup test as -1 */ - options.run_id--; + options.run_id = -1; fptr( ©, options.check ); run_arg_list_destroy( © ); options.run_id++; diff --git a/testing/testings.c b/testing/testings.c index 88df38910916d8890296e4046d6697b81f16b8ef..d50b392fc3b4dce78fca97b062010c304060bbda 100644 --- a/testing/testings.c +++ b/testing/testings.c @@ -139,12 +139,12 @@ testing_start( testdata_t *tdata ) } /* Start kernel statistics */ - if ( options.profile ) { + if ( options.profile && (options.run_id >= 0) ) { CHAMELEON_Enable( CHAMELEON_KERNELPROFILE_MODE ); } /* Start tracing */ - if ( options.trace && (options.run_id == 0) ) { + if ( options.trace && (options.run_id >= 0) ) { CHAMELEON_Enable( CHAMELEON_PROFILING_MODE ); } @@ -203,12 +203,12 @@ testing_stop( testdata_t *tdata, cham_fixdbl_t flops ) } /* Stop tracing */ - if ( options.trace && (options.run_id == 0) ) { + if ( options.trace && (options.run_id >= 0) ) { CHAMELEON_Disable( CHAMELEON_PROFILING_MODE ); } /* Stop kernel statistics */ - if ( options.profile ) { + if ( options.profile && (options.run_id >= 0) ) { CHAMELEON_Disable( CHAMELEON_KERNELPROFILE_MODE ); } #endif diff --git a/testing/vendor_ztesting.c b/testing/vendor_ztesting.c index 9acfe313c065ca16f852478647c4515b9f5f119b..df72f106c4c9315a0878d6811da589ce6975f44b 100644 --- a/testing/vendor_ztesting.c +++ b/testing/vendor_ztesting.c @@ -151,7 +151,7 @@ int main (int argc, char **argv) { run_arg_list_t copy = run_arg_list_copy( &(run->args) ); /* Run the warmup test as -1 */ - options.run_id--; + options.run_id = -1; fptr( ©, options.check ); run_arg_list_destroy( © ); options.run_id++;