Commit eb38c5c8 authored by Anton Gladky's avatar Anton Gladky

Add autopkgtests.

parent 36a09a74
#!/bin/sh
# autopkgtest check: Build and run a program against alglib
# (C) 2013 Thomas Moulard
# (C) 2014 Anton Gladky
# Author: Thomas Moulard <thomas.moulard@gmail.com>
# Anton Gladky <gladk@debian.org>
# autopkgtest check: Build and run a program against svgpp
# (C) 2017 Anton Gladky
# Author: Anton Gladky <gladk@debian.org>
set -e
WORKDIR=$(mktemp -d)
SRC=sample01a.cpp
echo $WORKDIR
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cp -r examples $WORKDIR/
cp -r cmake/* $WORKDIR/examples/
sed -i '3 a\ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})' $WORKDIR/examples/CMakeLists.txt
sed -i -e 's/wslay_shared/wslay/g' $WORKDIR/examples/CMakeLists.txt
cp -r src/samples/$SRC $WORKDIR/
cd $WORKDIR
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=./../inst ./../examples
make
g++ $SRC
echo "build: OK"
[ -x echoserv ]
[ -x fork-echoserv ]
[ -x testclient ]
# timeout 3 ./echoserv 1234
# timeout 3 ./fork-echoserv 1234
# timeout 3 ./testclient localhost 1234
[ -x a.out ]
ls -l
echo "run: OK"
#!/bin/sh
# autopkgtest check: Build and run a program against svgpp
# (C) 2017 Anton Gladky
# Author: Anton Gladky <gladk@debian.org>
set -e
WORKDIR=$(mktemp -d)
SRC=sample_value01.cpp
echo $WORKDIR
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cp -r src/samples/$SRC $WORKDIR/
cd $WORKDIR
g++ $SRC
echo "build: OK"
[ -x a.out ]
ls -l
echo "run: OK"
#!/bin/sh
# autopkgtest check: Build and run a program against svgpp
# (C) 2017 Anton Gladky
# Author: Anton Gladky <gladk@debian.org>
set -e
WORKDIR=$(mktemp -d)
SRC=sample_transform02.cpp
echo $WORKDIR
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cp -r src/samples/$SRC $WORKDIR/
cd $WORKDIR
g++ $SRC
echo "build: OK"
[ -x a.out ]
ls -l
echo "run: OK"
Tests: build1
Depends: libwslay-dev, build-essential, nettle-dev, cmake
Tests: build1 build2 build3
Depends: libsvgpp-dev, build-essential
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment