diff options
Diffstat (limited to 'orc-test/orctest.c')
-rw-r--r-- | orc-test/orctest.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/orc-test/orctest.c b/orc-test/orctest.c index f234ecf..1735171 100644 --- a/orc-test/orctest.c +++ b/orc-test/orctest.c @@ -331,9 +331,25 @@ check_bounds (void *ptr, int n, int size) return TRUE; } +static OrcTestResult orc_test_compare_output_full (OrcProgram *program, + int backup); + OrcTestResult orc_test_compare_output (OrcProgram *program) { + return orc_test_compare_output_full (program, 0); +} + +OrcTestResult +orc_test_compare_output_backup (OrcProgram *program) +{ + return orc_test_compare_output_full (program, 1); +} + + +OrcTestResult +orc_test_compare_output_full (OrcProgram *program, int backup) +{ OrcExecutor *ex; int n = 64 + (rand()&0xf); void *dest_exec[4] = { NULL, NULL, NULL, NULL }; @@ -348,9 +364,11 @@ orc_test_compare_output (OrcProgram *program) int acc_exec = 0, acc_emul = 0; int ret = ORC_TEST_OK; - result = orc_program_compile (program); - if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { - return ORC_TEST_INDETERMINATE; + if (!backup) { + result = orc_program_compile (program); + if (!ORC_COMPILE_RESULT_IS_SUCCESSFUL(result)) { + return ORC_TEST_INDETERMINATE; + } } ex = orc_executor_new (program); |