Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

annot_macros_allmacros_12 fails when not run in the nightly location #20182

Open
biagas opened this issue Jan 10, 2025 · 6 comments
Open

annot_macros_allmacros_12 fails when not run in the nightly location #20182

biagas opened this issue Jan 10, 2025 · 6 comments
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood

Comments

@biagas
Copy link
Contributor

biagas commented Jan 10, 2025

Describe the bug

This test uses a full path to the data file to display as annotation text.
The path differs if a developer runs the test from their own checkout, and thus the test fails.
It is a bit of an annoyance to discover there were errors in the test suite when testing locally only to discover this was the only failure.

It would be nice if this test either only used the db name, or filtered out the path to display only the root of the test suite.

There are places in our testing with text output that filters full paths to replace parts of them with VISIT_TOP_DIR so that the outputs will be the same everywhere. This use case is different, because it isn't textual output, but text added to the annotations being rendered.
Nevertheless, it should be possible to use the same filtering in this case before setting it as the text to be used in the annotation.

Expected behavior

The test shouldn't fail when run from a different location than the nightlies.

@biagas biagas added bug Something isn't working likelihood medium Neither low nor high likelihood impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) labels Jan 10, 2025
@markcmiller86
Copy link
Member

Oh, wow. Thats bad! Sheesh, why can't all developers just run things with the same paths I do 😝? That would simplify things a lot.

Ok, one quick option...we can just forgo the test of $fulldbname macro. Its probably not really doing anything more useful that the filename macro anyways.

@markcmiller86
Copy link
Member

Or, better yet, we can skip that test when not running on the tier 1 platform, call AddSkipCase() just prior to the Test() call for it.

@biagas
Copy link
Contributor Author

biagas commented Jan 10, 2025

Tier 1 platform? Does that mean poodle? Or poodle + nightly location?

@markcmiller86
Copy link
Member

So, include this code in the .py file...

def allmacros():
    """All non-empty macros in all text modes"""

    #
    # Loop through through all macros rendering with default format
    # both as 2D text and as 3D text. We skip "lod", "xunits", "yunits",
    # "zunits" and "varunits" because the input database has no values
    # specified for these.
    #
    macroNames = ("time", "cycle", "index", "numstates", "dbcomment",
        "vardim", "numvar", "topodim", "spatialdim", "varname",
        "meshname", "filename", "fulldbname", "xlabel", "ylabel", "zlabel")

    if sys.platform.startswith("win"):
        AddSkipCase("annot_macros_allmacros_12")

    text2d = create_text2d_annot()
    text3d = CreateAnnotationObject("Text3D")
    text3d.heightMode = text3d.Relative
    text3d.relativeHeight = 0.03

@markcmiller86
Copy link
Member

It should really skip when platform is not the tier1 platform. But, am busy with other items and don't have time to provide precise logic. I think you get the idea though.

@biagas
Copy link
Contributor Author

biagas commented Jan 10, 2025

Actually, that doesn't solve the case where I am running on poodle, but not in the nightly location.

No hurry on this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood
Projects
None yet
Development

No branches or pull requests

2 participants