File: hello-onscripter-en

package info (click to toggle)
onscripter 20220816-1
  • links: PTS
  • area: main
  • in suites: bookworm, forky, trixie
  • size: 1,408 kB
  • sloc: cpp: 32,308; xml: 114; sh: 100; makefile: 91; python: 10
file content (26 lines) | stat: -rwxr-xr-x 620 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh -e

TEMP=${AUTOPKGTEST_TMP:-${TMPDIR:-$(mktemp -d)}}
TDIR=$(mktemp -d $TEMP/helloenXXXXXX)

cp -R debian/tests/hello_data_en "$TDIR" 

S1=`date +%s%N`
START_TIME=`expr $S1 / 1000000`
if [ x"$DEBUG1" = x ]; then
    SDL_VIDEODRIVER=dummy /usr/games/onscripter-1byte -r "$TDIR/hello_data_en"
else
    /usr/games/onscripter-1byte -r "$TDIR/hello_data_en"
fi    
S21=`date +%s%N`
S2=`expr $S21 / 1000000`
ELAPSED_TIME=`expr $S2 - $START_TIME`

if [ $ELAPSED_TIME -lt 2000 ]; then
    #too fast. Must be an error.
    echo "Run too fast: $ELAPSED_TIME ms"
    exit 1
fi

echo "Test Passed: $ELAPSED_TIME ms"
exit 0