Skip to content

Commit

Permalink
FIX: spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
Paliak committed Jul 10, 2024
1 parent 768f136 commit 4e8861c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ If you're on windows, consider downloading [git for windows](https://git-scm.com
If you're using linux you can run the ./runtime/Path{space}of{space}Building.exe executable with wine. You will need to provide a valid wine path to the emmy lua debugger directory.
## Testing
Pob uses two types of tests. Unit tests that test specifc calculations or mechanics and "build diff" tests that calculate the effect the changes have on a given list of builds.
Pob uses two types of tests. Unit tests that test specific calculations or mechanics and "build diff" tests that calculate the effect the changes have on a given list of builds.
While both can be ran locally it's recommended to use the provided docker image for both ease of use and to keep everyone on the same page.
To run the unit tests run `docker compose up busted-tests`. This option uses the [Busted](https://olivinelabs.com/busted/) framework to test values returned by specific functions. For more details see the implementation of the tests in `spec/System/`.
To run the build difference tests run `docker compose up busted-diff`. `busted-diff` busted diff first computes a list of builds found in `spec/builds.txt` and `spec/TestBuilds/` while checked out to the current working changes. Then it uses git to checkout the branch specified by `DEVREF` or `dev` by defualt and computes the same builds. Lastly it finds the differences in the outputs generated from both, does some post processing, and prints all of the information out.
To run the build difference tests run `docker compose up busted-diff`. `busted-diff` busted diff first computes a list of builds found in `spec/builds.txt` and `spec/TestBuilds/` while checked out to the current working changes. Then it uses git to checkout the branch specified by `DEVREF` or `dev` by default and computes the same builds. Lastly it finds the differences in the outputs generated from both, does some post processing, and prints all of the information out.

Check warning on line 209 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (DEVREF)
`busted-diff` supports the following options through environment variables:
- `DEVREF`: Defines the branch to use as the reference against which to compare builds computed with new changes.

Check warning on line 212 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (DEVREF)
Expand All @@ -216,7 +216,7 @@ The following variables are meant to be internal only and only ever used with th
- `CACHEDIR`: Defines the directory where the cache of computed builds using `DEVREF` should be stored.

Check warning on line 216 in CONTRIBUTING.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (DEVREF)
#### Saving output
By defualt the output is not saved to a file but you can do so some your shell by either using `docker compose up busted-tests > log` (platform agnostic) or `docker compose up busted-tests | tee log` which will also allow you to see the output as it's being printed out (powershell/linux).
By default the output is not saved to a file but you can do so some your shell by either using `docker compose up busted-tests > log` (platform agnostic) or `docker compose up busted-tests | tee log` which will also allow you to see the output as it's being printed out (powershell/linux).
Additionally, the output from `busted-diff` can be quite noisy. If you'd like to only get a specific part of the output you can use to following:
- `sed -n '/Runtime comparison for/,/Savefile Diff for/{/Savefile Diff for/!p;}' log` to only print out runtime information or nothing if nothing interesting is to be shown.
Expand Down
4 changes: 2 additions & 2 deletions spec/GenerateBuilds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ for testBuild in fetchBuilds("../spec/TestBuilds") do
local calcDuration = GetTime() - startTime
print("[-] Computed " .. filePath .. " in " .. calcDuration .. "ms")

-- Save the computed build xml. Include full minuion and player outputs.
-- Save the computed build xml. Include full minion and player outputs.
local buildHnd = io.open(filePath .. ".build", "w+")
buildHnd:write(build:SaveDB("Cache", {fullPlayerStat = true, fullMinionStat = true} ))
buildHnd:close()

-- Save the amount of time calcutation of this build took
-- Save the amount of time calculation of this build took
local timeHnd = io.open(filePath .. ".time", "w+")
timeHnd:write(calcDuration)
timeHnd:close()
Expand Down

0 comments on commit 4e8861c

Please sign in to comment.