Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.76 KB

File metadata and controls

40 lines (27 loc) · 1.76 KB

Tests

Installing the Exercism GDScript track test runner

You'll need Godot installed correctly to use the test runner.

To build and test GDScript scripts for Exercism, Godot will be run in "headless" mode from the CLI. These instructions currently require Linux and bash.

Step 1: Installing the overall test runner infrastructure

To set up for testing, clone https://github.com/exercism/gdscript-test-runner and move its contents to /opt/exercism/gdscript/test-runner/:

git clone https://github.com/exercism/gdscript-test-runner.git
sudo mkdir -p /opt/exercism/gdscript/
sudo mv gdscript-test-runner/ /opt/exercism/gdscript/test-runner/

Step 2: Downloading the single-exercise test runner script

Assuming you have the exercism tool set up and have downloaded at least one GDScript exercise, it should have created an exercism/gdscript folder to house the exercises. Save the test runner in this folder and mark the file executable, or just create a link to it:

cd ~/exercism/gdscript # replace with your exercism/gdscript directory
ln /opt/exercism/gdscript/test-runner/bin/test-local-gdscript-solution.sh

Running tests

With the installation steps done, you should be able start from any exercise directory (e.g., ~/exercism/gdscript/two-fer) and run the script (living one level up, in ../) to test your local solution to that exercise:

../test-local-gdscript-solution.sh