From aa4eff7593c9435ca0e9a0c59e1cbdf2a389c644 Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Tue, 29 Sep 2026 22:07:46 -0700 Subject: [PATCH] Rewrite/simplify the install and testing docs --- docs/INSTALLATION.md | 55 ++++++++------------------------------------ docs/TESTS.md | 36 ++++++++--------------------- 2 files changed, 18 insertions(+), 73 deletions(-) diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index 435c67e..a92cec1 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -1,56 +1,19 @@ # Installation -## Installing Godot Engine +The [Godot Engine][godot-engine] is used to run GDScript code. +The Godot Engine runs on Windows, Linux, macOS, and Android. + -The GDScript track is built on top of [Godot Engine][godot-engine], which runs on Windows, Linux, macOS, and Android. -For the moment, the test runner for [working locally][working-locally] requires Linux. -This track requires Godot version 4.0 or greater. +## Installing Godot Engine + +The Godot Engine can be downloaded directly from [the Godot Engine website][godot-engine]. +The download contains a single executable, named with the Godot Engine version. +This file needs to renamed `godot` and placed in one of the `$PATH` directories. After completing the installation, you can verify if the CLI was installed successfully by running this command in a terminal: ```bash godot --version ``` -## Installing the Exercism GDScript track test runner - -You'll need [Godot installed][installation] 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][gdscript-test-runner] and move its contents to `/opt/test-runner/`: - -```sh -git clone https://github.com/exercism/gdscript-test-runner.git -sudo mv gdscript-test-runner/ /opt/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 a `gdscript` folder under your workspace (as shown by running `exercism configure`) to house the exercises. -Save [the test runner][test-local-gdscript-solution] in this folder and mark the file executable. - -## 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: - -```sh -../test-local-gdscript-solution.sh -``` - -[installation]: https://exercism.org/docs/tracks/gdscript/installation -[gdscript-test-runner]: https://github.com/exercism/gdscript-test-runner -[test-local-gdscript-solution]: https://raw.githubusercontent.com/exercism/gdscript-test-runner/refs/heads/main/bin/test-local-gdscript-solution.sh - -## Using an IDE - -To get GDScript syntax highlighting inside an editor like [Visual Studio Code][vscode], you'll need an extension such as [godot-tools][godot-tools] installed plus a running debug server. -Godot starts this debug server automatically whenever a project is open in its own editor and keeps it running until the project or Godot itself is closed. - -[godot-engine]: https://godotengine.org/ -[working-locally]: /docs/using/solving-exercises/working-locally.md -[vscode]: https://code.visualstudio.com/download -[godot-tools]: https://open-vsx.org/vscode/item?itemName=geequlim.godot-tools +This track uses Godot version 4.7.2. diff --git a/docs/TESTS.md b/docs/TESTS.md index a522f64..9e68c6b 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -1,40 +1,22 @@ # Tests -## Installing the Exercism GDScript track test runner - You'll need [Godot installed][installation] 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 +## Running tests -To set up for testing, clone [https://github.com/exercism/gdscript-test-runner][gdscript-test-runner] and move its contents to `/opt/test-runner/`: +The [test runner][] is used to load and test solutions. +To run the test runner, download it locally then use `godot` to run the test runner. +In the future, the test runner will automatically be downloaded alongside exercises when using `exercism download`. -```sh -git clone https://github.com/exercism/gdscript-test-runner.git -sudo mkdir -p /opt/ -sudo mv gdscript-test-runner/ /opt/test-runner/ +```bash +godot --headless -s /path/to/test_runner.gd -- ``` -### 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][test-local-gdscript-solution] in this folder and mark the file executable, or just create a link to it: +For example, -```sh -cd ~/exercism/gdscript # replace with your exercism/gdscript directory -ln /opt/test-runner/bin/test-local-gdscript-solution.sh +```bash ``` -## 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: - -```sh -../test-local-gdscript-solution.sh -``` [installation]: https://exercism.org/docs/tracks/gdscript/installation -[gdscript-test-runner]: https://github.com/exercism/gdscript-test-runner -[test-local-gdscript-solution]: https://raw.githubusercontent.com/exercism/gdscript-test-runner/refs/heads/main/bin/test-local-gdscript-solution.sh \ No newline at end of file +[test runner]: https://raw.githubusercontent.com/exercism/gdscript-test-runner/refs/heads/main/bin/test_runner.gd