Skip to content

Commit

Permalink
Merge branch 'linux-debug-run-old-commits' into linux
Browse files Browse the repository at this point in the history
- old commits compile and run as expected
- includes files for testing the linux branch (german strings)
- tests improved to fail if ctp2 segfaults
  • Loading branch information
LynxAbraxas committed Nov 17, 2018
2 parents 70921ab + b34c2f0 commit fd496f4
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 54 deletions.
Binary file removed .civctp2/save/games/Julius/Julius-Roma-3450BC
Binary file not shown.
1 change: 1 addition & 0 deletions .civctp2/save/games/Julius/Julius-Roma-3450BC
Binary file removed .civctp2/save/games/Julius/Julius-Roma-3600BC
Binary file not shown.
Binary file removed .civctp2/save/games/Julius/Julius-Roma-3725BC
Binary file not shown.
Binary file removed .civctp2/save/games/Julius/Julius-Roma-3775BC
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
37 changes: 0 additions & 37 deletions .civctp2/userprofile.txt
Expand Up @@ -71,13 +71,11 @@ AlienEndGame=Yes
UnitCompleteMessages=Yes
NonContinuousUnitCompleteMessages=Yes
DebugSlic=Yes
DebugSlicEvents=No
DiplomacyLog=No
CheatAge=0
DontKillMessages=No
AIPopCheat=Yes
ShowCityNames=Yes
ShowArmyNames=No
ShowTradeRoutes=Yes
UnitSpeed=1
MouseSpeed=5
Expand All @@ -99,7 +97,6 @@ AutoOpenCityWindow=Yes
ShowEnemyHealth=Yes
ShowCityInfluence=Yes
ShowPoliticalBorders=Yes
GoodRichness=50
EndTurnSound=Yes
EnableLogs=Yes
DisplayUnits=Yes
Expand All @@ -108,43 +105,9 @@ DisplayBorders=Yes
DisplayFilter=Yes
DisplayTrade=Yes
DisplayTerrain=Yes
DisplayPolitical=No
DisplayCapitols=No
DisplayRelations=No
CloseOnEyepoint=No
ShowExpensive=No
ColorSet=0
ShowOrderUnion=No
RecentAtTop=No
RuleSets=
CityClick=No
EndTurnWithEmptyBuildQueues=No
RunInBackground=No
AutoExpireTreatyBase=-1
CityCaptureOptions=No
Upgrade=No
SmoothBorders=No
CivFlags=Yes
AICityDefenderBonus=No
BarbarianCities=No
SectarianHappiness=No
RevoltCasualties=No
RevoltInsurgents=No
BarbarianCamps=No
BarbarianSpawnsBarbarian=No
AINoSinking=No
GoldPerUnitSupport=No
GoldPerCity=No
AIMilitiaUnit=No
OneCityChallenge=No
EnergySupply&DemandRatio=No
ShowDebugAI=No
CitiesLeaveRuins=No
NoCityLimit=No
DebugCityAstar=No
NewCombat=Yes
NoGoodyHuts=No
RandomCustomMap=No
SPStartingAge=0
SPEndingAge=9
ShowCityProduction=Yes
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Expand Up @@ -87,7 +87,7 @@ test:ss_new:
- pidX=$!
- sleep 3
- docker pull $IMAGE_TAG:test
- docker run --env DISPLAY -v ${SHARED_PATH}/.X11-unix/:/tmp/.X11-unix/ $IMAGE_TAG:test ./ctp2 nointromovie &
- docker run --env DISPLAY -v ${SHARED_PATH}/.X11-unix/:/tmp/.X11-unix/ -v $(pwd)/.civctp2/userprofile.txt:/opt/ctp2/ctp2_program/ctp/userprofile.txt -v $(pwd)/.civctp2/save/:/opt/ctp2/ctp2_program/ctp/save/ $IMAGE_TAG:test ./ctp2 nointromovie &
- pidD=$!
- java -cp "/opt/sikulixapi.jar:/opt/jython-standalone-2.7.1.jar" org.python.util.jython tests/new-game.sikuli/new-game.py
- kill $pidD
Expand Down Expand Up @@ -129,3 +129,4 @@ release:
- docker push $IMAGE_TAG:latest
only:
- master
- linux
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -43,8 +43,8 @@ COPY ctp2CD/ /opt/ctp2/

RUN cd /ctp2 && \
make bootstrap && \
LD_LIBRARY_PATH="/usr/lib/i386-linux-gnu/" \
CFLAGS="-fpermissive -Wl,--no-as-needed -m32" \
LD_LIBRARY_PATH="${LD_LIBRARY_PATH} /usr/lib/i386-linux-gnu/" \
CFLAGS="-Wl,--no-as-needed -m32" \
CXXFLAGS="-fpermissive -Wl,--no-as-needed -m32" \
./configure --prefix=/opt/ctp2 --bindir=/opt/ctp2/ctp2_program/ctp --enable-silent-rules && \
make && \
Expand Down
2 changes: 1 addition & 1 deletion ctp2
Submodule ctp2 updated 2257 files
18 changes: 13 additions & 5 deletions tests/load-game.sikuli/load-game.py
Expand Up @@ -16,13 +16,21 @@ def main():
click("ctp2Julius-Roma-file.png")
click(Pattern("ctp2OK-btn.png").similar(0.99))
if exists("ctp2ctr-bar.png", 100):
waitVanish("ctp2progress-bar.png", 100) # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
print("Saved screen as "+file)
shutil.move(file, 'ctp2load-game.png')
exit(0)
if waitVanish("ctp2progress-bar.png", 100): # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
if file:
f= Finder(file) # http://doc.sikuli.org/finder.html
f.find("ctp2ctr-bar.png")
if not f.hasNext():
print("Pattern not found in screen shot: " + file)
exit(30)
shutil.move(file, 'ctp2load-game.png')
exit(0)
else:
exit(20)
else:
exit(10)
exit(99)

if __name__ == "__main__":
main()
18 changes: 13 additions & 5 deletions tests/new-game.sikuli/new-game.py
Expand Up @@ -14,13 +14,21 @@ def main():
click("ctp2new-game-btn.png")
click("ctp2launch-btn.png")
if exists("ctp2ctr-bar.png", 100):
waitVanish("ctp2progress-bar.png", 100) # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
print("Saved screen as "+file)
shutil.move(file, 'ctp2new-game.png')
exit(0)
if waitVanish("ctp2progress-bar.png", 100): # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
if file:
f= Finder(file) # http://doc.sikuli.org/finder.html
f.find("ctp2ctr-bar.png")
if not f.hasNext():
print("Pattern not found in screen shot: " + file)
exit(30)
shutil.move(file, 'ctp2new-game.png')
exit(0)
else:
exit(20)
else:
exit(10)
exit(99)

if __name__ == "__main__":
main()
12 changes: 9 additions & 3 deletions tests/start-game.sikuli/start-game.py
Expand Up @@ -12,11 +12,17 @@
def main():
if exists("ctp2start-scr.png", 100):
file = capture(SCREEN.getBounds())
print("Saved screen as "+file)
shutil.move(file, 'ctp2start.png')
exit(0)
if file:
f= Finder(file) # http://doc.sikuli.org/finder.html
f.find("ctp2start-scr.png")
if not f.hasNext():
print("Pattern not found in screen shot: " + file)
exit(30)
shutil.move(file, 'ctp2start.png')
exit(0)
else:
exit(10)
exit(99)

if __name__ == "__main__":
main()

0 comments on commit fd496f4

Please sign in to comment.