Skip to content

update README.md with latest intructions to run tests #108

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,48 @@ To execute **all** standalone tests, navigate to the `tests/` directory and run:

```bash
cd tests/
FC='lfortran' ./run_tests.sh
FC='lfortran --cpp' ./run_tests.sh
```

or, to run them with GFortran compiler, do:

```bash
cd tests/
FC='gfortran -cpp' ./run_tests.sh
```

### Running a Specific Standalone Test

If you want to run a single test (for example, `testFilename.f90`), execute:
If you want to run a single test (for example, `test_filename.f90`), execute:

```bash
cd tests/
FC='lfortran --cpp' ./run_tests.sh test_filename.f90
```

or, to run it with GFortran compiler, do:

```bash
cd tests/
FC='lfortran' ./run_tests.sh testFilename.f90
FC='gfortran -cpp' ./run_tests.sh test_filename.f90
```

### Running the `pot3d` Test

To build and run the `pot3d` test, navigate to the `tests/pot3d/` directory.

- For Lfortran run:
- For LFortran run:

```bash
cd tests/pot3d/
FC='lfortran' ./build_and_run_lfortran.sh
FC='lfortran --cpp' ./build_and_run_lfortran.sh
```

- For GFortran run:

```bash
cd tests/pot3d/
FC='gfortran' ./build_and_run_gfortran.sh
FC='gfortran -cpp' ./build_and_run_gfortran.sh
```

---
Expand All @@ -90,9 +104,7 @@ FC='gfortran' ./build_and_run_gfortran.sh
You can pass custom flags to your Fortran compiler using the `FC` environment variable. For example, to compile with optimization flags using gfortran, run:

```bash
FC='gfortran -O3' ./run_tests.sh
FC='gfortran -cpp -O3' ./run_tests.sh
```

This enables you to tailor the compilation process to your needs.