-
-
Notifications
You must be signed in to change notification settings - Fork 3
3. Building From Source
Jase edited this page Oct 16, 2025
·
2 revisions
This is for people who are working on any tasks/bugs/feature proposals for the test adapter for doctest or if you want to build the test adapter from source directly to produce your own vsix output file.
- Install python version 3.8+ - either from the Microsoft Store or download any suitable version from the python website.
- Make sure to check "Add python.exe to PATH" or remember to manually add the install and scripts folder to your PATH variable.
- Install pip - In a command prompt window, run
python -m ensurepip --upgrade. - Install scons 4.0+ - In a command prompt window, run
python -m pip install scons. - Download the source code for this project.
- You can use something like GitHub Desktop to download and manage changes.
- Open a command prompt or "cd" into the
DoctestTestAdapter.Examples.Godotfolder and run:scons platform=windows target=editor dev_build=yes dev_mode=yes vsproj=yes vsproj_gen_only=no.- This may take a few minutes because it's building the godot engine source code.
- Open a command prompt or "cd" into the
DoctestTestAdapter.Examples.Godotfolder and runbin\godot.windows.editor.dev.x86_64.console.exe --gdscript-generate-tests modules/gdscript/tests/scripts. - Open a command prompt or "cd" back up a level into the root repository folder and run
dotnet restore DoctestTestAdapter.slnthen once that's finished, run the same command again but forDoctestTestAdapter.Godot.sln:dotnet restore DoctestTestAdapter.Godot.sln.- This should make sure any C# packages are referenced correctly.
- Go into the
DoctestTestAdapter.Examples.Godotfolder and opengodot.sln. - Open up the project properties page for godot (All Configurations, All Platforms) and go to NMake -> Build Command and paste this:
scons platform=windows target=editor dev_build=yes dev_mode=yes cache_path="Path/To/DoctestTestAdapter/DoctestTestAdapter.Examples.Godot/.scons_cache"- This command with the
cache_pathshould help speed up subsequent builds.
- This command with the
- Add a new
.runsettingsfile to the solution folder and copy/paste these settings in the file and save it:
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<RunConfiguration>
<!-- set default session timeout to 5m -->
<TestSessionTimeout>500000</TestSessionTimeout>
<TreatNoTestsAsError>true</TreatNoTestsAsError>
</RunConfiguration>
<Doctest>
<GeneralSettings>
<CommandArguments>--headless --test</CommandArguments>
</GeneralSettings>
<DiscoverySettings>
<SearchDirectories>
<string>modules</string>
<string>tests</string>
</SearchDirectories>
</DiscoverySettings>
</Doctest>
</RunSettings> - Go to Tests -> Configure Run Settings -> Select Solution Wide runsettings File and select the new
.runsettingsfile you just created and then save all.- Doing this during setup so it's prepared for whenever you want to open up the godot example solution for testing any test adapter code changes.
- Open
DoctestTestAdapter.Godot.sln. - Go to Project Properties for the
DoctestTestAdapterproject -> Signing -> Untick Sign the assembly and do the same for theDoctestTestAdapter.VSIXproject. - Set
DoctestTestAdapter.VSIXas the start up project in the solution and then just build and run it.- This will run and install the test adapter in the experimental version of your Visual Studio version so you can test it in a Visual Studio environment but not have to modify your standard environment. E.g. Runs and installs the test adapter in 'Visual Studio Community 2022 Exp', your regular Visual Studio Community 2022 won't have it installed.
- If you want to see your own output vsix file: navigate to the bin folder after building e.g.
\DoctestTestAdapter.VSIX\bin\Debug\and you should be able to findDoctestTestAdapter.vsixthere to install.