[flang-commits] [PATCH] D146485: Add tests from gfortran test suite [build files]

Tarun Prabhu via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Apr 12 09:04:39 PDT 2023


tarunprabhu added a comment.

High-level instructions to test this patch.

1. Checkout the llvm-test-suite into a directory, say `llvm-test-suite`.
2. Apply this patch to `llvm-test-suite`.
3. Checkout/download the GCC source code, for instance from (here)[https://github.com/gcc-mirror/gcc] into a directory, say `gcc`.
4. Copy the ***contents*** of `gcc/gcc/testsuite/gfortran.dg` into `llvm-test-suite/Fortran/gfortran/regression/`
5. Copy the ***contents*** of `gcc/gcc/testsuite/gfortran.fortran-torture` into `llvm-test-suite/Fortran/gfortran/torture/`

I use the following command to build the test-suite. It should only run the Fortran tests.

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/path/to/clang -DCMAKE_CXX_COMPILER=/path/to/clang++ -DCMAKE_Fortran_COMPILER=/path/to/flang-new -DCMAKE_Fortran_FLAGS=-flang-experimental-exec 
  -DTEST_SUITE_FORTRAN=On -DTEST_SUITE_SUBDIRS=Fortran /path/to/source/of/llvm-test-suite

I use the following command to run the tests from the llvm-test-suite build directory.

  NO_STOP_MESSAGE=1 llvm-lit -v  .

All the tests should pass.


Repository:
  rT test-suite

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146485/new/

https://reviews.llvm.org/D146485



More information about the flang-commits mailing list