Free and Open Source real time strategy game with a new take on micro-management

-test-games

From Globulation2

Revision as of 23:12, 6 April 2008 by Giszmo (talk | contribs) (partly restored page and extended the testing ideas)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ok. -test-games is one of the sites gone since the move to my server. the essential parts are the two scripts i wrote to automate testing.

$ cat gdbCommands
run -test-games-nox
bt
bt full
q

$ cat runGlob2Tests.sh
#!/bin/bash
trap bashtrap INT
bashtrap()
{
        killall -9 glob2
        exit
}
X=0
#max 10 bug reports as infinite repeation might result in nasty waste of resource
while [ $X -le 10 ] ; do
        echo $X crashes so far in round $1 ...
        gdb -x gdbCommands src/glob2 > gdbOutput.txt
        mkdir crash$1$X
        mv gdbOutput.txt crash$1$X/
        mv ~/.glob2/games/Auto_save.game ~/.glob2/games/crashed$1$X.game
        bzip2 --compress --keep -9 crash$1$X/gdbOutput.txt
        bzip2 --compress --keep -9 ~/.glob2/games/crashed$1$X.game
        mv ~/.glob2/games/crashed$1$X.game.bz2 crash$1$X/
        zenity --info --text="crash" &
        X=$(($X+1))
done

$ cat runGlob2TestsWithGHAndScons.sh
#!/bin/bash
trap bashtrap INT
bashtrap()
{
        killall runGlob2Tests.sh
        exit
}
cd /home/leo/projects/glob2_2
X=0
./runGlob2Tests.sh $X &
while true ; do
        hg pull http://hg.globulation2.org/glob2
        hg update -C -r beta3-rc
        killall runGlob2Tests.sh
        killall -9 glob2
        scons -j4
        X=$(($X+1))
        ./runGlob2Tests.sh $X &
        sleep $(( 60*30 ))
done

an idea now is to use the random numbers to identify games that crash and find them faster using -O3. some

compile using -O3
run without gdb|grep Random>>random.txt
compile
run using gdb and tail of random.txt to get the bt like above
Misc