This is an archive of the discontinued LLVM Phabricator instance.

[Flang] Port test_folding.sh to Python
ClosedPublic

Authored by ijan1 on Aug 17 2021, 10:11 AM.

Details

Summary

To enable Flang testing on Windows,
shells scripts have to be ported to Python.
The following changes have been made:
Ported test_folding.sh to Python;
Additional changes to the tests themselves
to use the new script.

LIBPGMATH support for testing
not available at this point.

Diff Detail

Event Timeline

ijan1 requested review of this revision.Aug 17 2021, 10:11 AM
ijan1 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 17 2021, 10:11 AM

"folding21.f90" was added a few days ago and fails in all cases. It's not been set as "XFAIL" so I am unsure if that's something on my end.

ijan1 updated this revision to Diff 367217.Aug 18 2021, 8:18 AM

Hopefully fixes the few failing tests due to a regex issue.

Meinersbur added inline comments.Aug 18 2021, 9:54 AM
flang/test/Evaluate/test_folding.py
67

cf folding05.f90:
Consider specifying encoding="utf-8". Docs mention that the default-encoding is platform-dependent and it seems to be UTF-8 on Linux but cp1252 (Maybe dependent on localization) on Windows.

ijan1 updated this revision to Diff 367503.Aug 19 2021, 8:09 AM

Specified encoding to fix a failing test on Windows.

ijan1 added a comment.Aug 25 2021, 3:27 AM

@Meinersbur would it be fine to also disable these failings tests on Windows? I have filed a bug report on bugzilla[1] for D107956. I could include them there or file a new one.

[1] https://bugs.llvm.org/show_bug.cgi?id=51597

ijan1 updated this revision to Diff 369892.Sep 1 2021, 2:44 AM

Rebased to include newly added tests.

ijan1 edited the summary of this revision. (Show Details)Sep 1 2021, 2:44 AM
ijan1 updated this revision to Diff 370528.Sep 3 2021, 3:24 AM

Re-enabling some tests.

ijan1 updated this revision to Diff 370570.Sep 3 2021, 6:25 AM

Rebase to mollify buildbots.

ijan1 added a comment.Sep 6 2021, 1:21 AM

@Meinersbur is this one ready to be merged?

Meinersbur accepted this revision.Sep 6 2021, 6:46 AM

LGTM

Please edit the commit messsage (remove Known test failures) before landing.

This revision is now accepted and ready to land.Sep 6 2021, 6:46 AM
ijan1 edited the summary of this revision. (Show Details)Sep 6 2021, 6:54 AM
This revision was landed with ongoing or failed builds.Sep 6 2021, 6:55 AM
This revision was automatically updated to reflect the committed changes.
flang/test/Evaluate/test_folding.py