Skip to content

Add rudimentary trigger tests#6574

Merged
LocalIdentity merged 8 commits intoPathOfBuildingCommunity:devfrom
Paliak:rudimentaryTriggerTests
Dec 5, 2023
Merged

Add rudimentary trigger tests#6574
LocalIdentity merged 8 commits intoPathOfBuildingCommunity:devfrom
Paliak:rudimentaryTriggerTests

Conversation

@Paliak
Copy link
Contributor

@Paliak Paliak commented Sep 1, 2023

Description of the problem being solved:

Adds rudimentary tests for trigger skills.

ac203b7 was caused by:

gemInstance.grantedEffect.triggered = gemInstance.triggered

gemData granted effects are set on program startup and never refreshed otherwise. This means that anything set in there will persist through build xml loads.

Tool reference for debugging tests running inside of a container with emmylua. (the emmy_core.so that comes with the extension doesn't work. Glibc mismatch issues.)

FROM alpine:3.18

WORKDIR /opt

RUN apk add --no-cache build-base readline-dev wget unzip git ca-certificates cmake openssl

RUN wget https://www.lua.org/ftp/lua-5.1.5.tar.gz && tar -xf lua-5.1.5.tar.gz && cd lua-5.1.5 && make linux test && make install

RUN wget https://luarocks.org/releases/luarocks-3.7.0.tar.gz && tar xf luarocks-3.7.0.tar.gz && cd luarocks-3.7.0 && ./configure --with-lua-include=/usr/local/include && make && make install

RUN git clone --depth 1 --branch v2.1.0-beta3 https://github.com/LuaJIT/LuaJIT && cd LuaJIT && make && make install && ln -sf /opt/LuaJIT/src/luajit /usr/local/bin/luajit

RUN luarocks install busted && luarocks install cluacov

RUN git clone --depth 1 --branch 1.7.1 https://github.com/EmmyLua/EmmyLuaDebugger && cd EmmyLuaDebugger && mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ../ && make && make install

WORKDIR /root

CMD busted --lua=luajit | tee spec/test_results.log
services:
  busted-tests:
    build: .
    container_name: busted-tests
    ports:
      - "9966:9966"
    volumes:
      - ./:/root
package.cpath = package.cpath .. ";/usr/local/bin/?.so"
local dbg = require("emmy_core")
dbg.tcpListen("localhost", 9966)
dbg.waitIDE()

@Paliak Paliak added the technical Hidden from release notes label Sep 16, 2023
Fixes order mattering in tests. gemData is never refreshed after program
start.
@LocalIdentity LocalIdentity merged commit 010c6bb into PathOfBuildingCommunity:dev Dec 5, 2023
@Paliak Paliak deleted the rudimentaryTriggerTests branch January 20, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Hidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments