Git Product home page Git Product logo

fortran-test-runner's Introduction

Gitpod Ready-to-Code

Exercism Fortran Test Runner

Docker image used for automatic testing of the Fortran track's exercises.

This test runner, much like the ones for other tracks, must respect the specified interface.

Since the test runners are deployed as Docker images the related specification must be respected for the Dockerfile.

Running tests

To run tests:

  1. Open project's root in terminal
  2. Run ./test.sh

This will compile and run tests for all exercises in the tests folder, it will fail if the output file result.json is different from the expected one for the exercise.

If you want to run specific tests:

  1. Open project's root in terminal
  2. Run ./test.sh <EXERCISE_SLUG_1> <EXERCISE_SLUG_2>

In both cases you can show more informations, like Docker output, by using the flag -v or --verbose.

How it works

On the Fortran track we use CMake for building the exercises.

fortran-test-runner's People

Contributors

dependabot[bot] avatar erikschierboom avatar exercism-bot avatar ihid avatar kytrinyx avatar pclausen avatar peterschussheim avatar saschamann avatar simisc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

fortran-test-runner's Issues

Hello World example fails in online editor

Dear all, I try to solve the first Fortran exercise and this is my (presumably correct) version:

module hello_world
contains
  function hello()
    character(13) :: hello
    hello = "Hello, World!"
  end function hello
end module hello_world

It passes all tests locally (GNU 11) but in the online editor I get:

An error occurred while running your tests. This might mean that there was an issue in our infrastructure, or it might mean that you have something in your code that's causing our systems to break.

Please check your code, and if nothing seems to be wrong, try running the tests again.

If I introduce errors in the code I get correct compiler messages. I do not know what else to try or if the runner is broken somehow.

Upgrade to version 3 spec

If possible, this test runner should be updated to version 3 of the test runner interface specification. In version 3, one additional feature is enabled: the ability to link individual tests to tasks. This allows the website to show which tests belong to which tasks.

The way tests are linked to tasks is via an (optional) task_id field, which is an integer that matches the number of the task as defined in the exercise's instructions.md file (note: the instructions start at index 1).

This is an example of a test in the results.json file:

{
  "name": "Expected oven time in minutes",
  "status": "pass",
  "task_id": 1,
  "test_code": "Assert.Equal(40, Lasagna.ExpectedMinutesInOven());"
}

You are completely free in how to implement this. Some options are:

  1. Add metadata to a test that the test runner can then discover while running the tests (e.g. an attribute or annotation)
  2. Define a test name/task id mapping (e.g. in the exercise's .meta/config.json file)
  3. Any other option you can think of...

Let me know if there are any questions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.