Page MenuHomePhabricator

[OpenMP][Tool] Extend reuse of OMPT testing
ClosedPublic

Authored by protze.joachim on Mar 11 2020, 10:34 AM.

Details

Summary

This patch allows to specify a prefix (default:empty) to be included into print-out written by callback.h.
Also adding a cmake target to find the header file from other tests.
This will be used by new tests in a follow-up review.

Diff Detail

Event Timeline

Applied clang-format on the patch

Is there a reasonable way to test this?

openmp/runtime/test/ompt/callback.h
1031

Style: If this is the only use case, shouldn't we avoid double negation here and define something like TOOL_PRESENT in case the prefix is defined?

I removed the double negation.

The callback.h header is heavily tested by all the test cases in openmp/runtime/test/ompt/*.
All those tests expect specific output generated by this header. While they also check for the output printed by the header, their main purpose is of cause to test the OMPT callbacks triggered by the runtime.

Tests for the new prefix come with the multiplexing tool.

jdoerfert accepted this revision.Jun 10 2020, 8:30 AM

LGTM, one comment below.

openmp/runtime/test/ompt/callback.h
21

I think you should use the compiler namespace here _TOOLS_PREFIX and _OMPT_TESTS. Also undef them at the end :)

This revision is now accepted and ready to land.Jun 10 2020, 8:30 AM
This revision was automatically updated to reflect the committed changes.