forked from github/server
add a script that runs all tests
clean up the build scripta bit bind ship type
This commit is contained in:
parent
9aeb0f6b86
commit
ae68a1beaf
2
cutest
2
cutest
|
@ -1 +1 @@
|
|||
Subproject commit d83cec09a52835274ab8ed4849de16fb8658982a
|
||||
Subproject commit 788659594ef87e9f497b8039da764182adfd2943
|
5
s/build
5
s/build
|
@ -4,9 +4,12 @@ while [ ! -d $ROOT/.git ]; do
|
|||
ROOT=$(dirname $ROOT)
|
||||
done
|
||||
|
||||
MACHINE=`uname -m`
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||
BIN_DIR="build-$MACHINE-$CC-Debug"
|
||||
|
||||
[ -z "$JOBS" ] && JOBS=$(nproc)
|
||||
DISTCC=`which distcc`
|
||||
if [ ! -z "$DISTCC" ] ; then
|
||||
|
@ -20,8 +23,6 @@ fi
|
|||
fi
|
||||
echo "Building with $CC and $JOBS jobs"
|
||||
|
||||
MACHINE=`uname -m`
|
||||
BIN_DIR="build-$MACHINE-$CC-Debug"
|
||||
if [ ! -d $ROOT/$BIN_DIR ]; then
|
||||
echo "cannot find build directory $BIN_DIR in $ROOT. did you run cmake-init?"
|
||||
exit
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
ROOT=$(pwd)
|
||||
while [ ! -d $ROOT/.git ]; do
|
||||
ROOT=$(dirname $ROOT)
|
||||
done
|
||||
|
||||
MACHINE=`uname -m`
|
||||
[ -z "$CC" ] && [ ! -z `which gcc` ] && CC="gcc"
|
||||
[ -z "$CC" ] && [ ! -z `which tcc` ] && CC="tcc"
|
||||
[ -z "$CC" ] && [ ! -z `which cc` ] && CC="cc"
|
||||
BIN_DIR="build-$MACHINE-$CC-Debug"
|
||||
|
||||
if [ ! -d $ROOT/$BIN_DIR ]; then
|
||||
echo "cannot find build directory $BIN_DIR in $ROOT. did you run cmake-init?"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo $ROOT
|
||||
$ROOT/$BIN_DIR/eressea/test_eressea
|
||||
pushd $ROOT/game-e2
|
||||
$ROOT/$BIN_DIR/eressea/eressea -e run_tests
|
||||
cd $ROOT/game-e3
|
||||
$ROOT/$BIN_DIR/eressea/eressea -e run_tests
|
||||
popd
|
|
@ -177,6 +177,13 @@ static int tolua_ship_get_coast(lua_State * L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int tolua_ship_get_type(lua_State * L)
|
||||
{
|
||||
ship *self = (ship *) tolua_tousertype(L, 1, 0);
|
||||
tolua_pushstring(L, self->type->name[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void tolua_ship_open(lua_State * L)
|
||||
{
|
||||
/* register user types */
|
||||
|
@ -201,8 +208,8 @@ void tolua_ship_open(lua_State * L)
|
|||
tolua_ship_set_region);
|
||||
tolua_variable(L, TOLUA_CAST "coast", tolua_ship_get_coast,
|
||||
tolua_ship_set_coast);
|
||||
tolua_variable(L, TOLUA_CAST "type", tolua_ship_get_type, 0);
|
||||
#ifdef TODO
|
||||
.property("type", &ship_gettype)
|
||||
.property("weight", &ship_getweight)
|
||||
.property("capacity", &ship_getcapacity)
|
||||
.property("maxsize", &ship_maxsize)
|
||||
|
|
Loading…
Reference in New Issue