Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Porting F18 tests to use LLVM lit without FileCheck #1027

Merged
merged 4 commits into from
Mar 13, 2020

Commits on Mar 13, 2020

  1. Re-enable semantics/altreturn{02,03} tests

    These tests were disabled due to flang-compiler#407.
    Previously these tests caused F18 to crash as the feature was not fully
    implemented.
    
    The altreturn feature is now implemented, so these tests can be
    re-enabled. altreturn03 tested some negative cases which F18 correctly
    diagnoses. Modified that test to expect these new error messages. Also
    make the later cases in the test reachable.
    
    These tests can now be ported by the script to lit-style tests.
    
    Change-Id: Ib336c10d55068d9a26fc2deb43ad052e74e73456
    LukeIreland1 committed Mar 13, 2020
    Configuration menu
    Copy the full SHA
    4de19d7 View commit details
    Browse the repository at this point in the history
  2. Create a separate directory for unittests

    Some of the regression tests are C programs that act as test harnesses
    for the compiler internals as opposed to being Fortran inputs to test
    the compiler in action. The former style of tests are analog to LLVM's
    unittests and will not use the lit framework.
    
    Change-Id: I0ff10e23f66ff843e8fff4c35cfb6559b9dab762
    LukeIreland1 committed Mar 13, 2020
    Configuration menu
    Copy the full SHA
    2bfddbe View commit details
    Browse the repository at this point in the history
  3. Port all remaining regression tests to lit

    We have re-classified a subset of the regression tests as unit tests and
    now we are porting the remaining ones.
    
    Test discovery and running is now performed by lit rather than ctest.
    The tests continue to use their original scripts with minor
    modifications. Most of the changes were mechanical and so scripted.
    A few changes were made by hand. Details
    
    Manual:
      * modfile09-*.f90 tests depend on being run together as some tests have
        dependencies on modules created by other tests. This will need
         separating out when porting away from test_modfile.sh, but for now,
         added modfile09-*.f90 to the Inputs directory and added a single
         tests modfile09.f90 to hold the run line.
      * getdefinition03-a.f90 includes a non-test file getdefinition03-b.f90.
        Manually edited the former to find the latter in Inputs so as to add
        only one test.
      * Same pattern for getsymbols03-{a,b}.f90
    
    Auto:
      * Remaining tests have a lit RUN line added to them based on the type
        of test they are.
      * Failing tests also have an XFAIL line added to them.
      * Generic tests have their pre-existing RUN lines replaced with the
        word "EXEC" to avoid conflict with the added lit RUN line.
    LukeIreland1 committed Mar 13, 2020
    Configuration menu
    Copy the full SHA
    63ec0af View commit details
    Browse the repository at this point in the history
  4. Added CMakeLists changes, moved config and made test scripts compatible.

    All Fortran tests are now run in lit, except Preprocessing tests flang-compiler#1052
    Preprocessing tests are a separate kind of test, so will be sorted out
    later.
    LukeIreland1 committed Mar 13, 2020
    Configuration menu
    Copy the full SHA
    3f99d35 View commit details
    Browse the repository at this point in the history