File: providedTests

package info (click to toggle)
intervalstorej 1.2%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,004 kB
  • sloc: java: 4,354; xml: 44; makefile: 18; sh: 12
file content (25 lines) | stat: -rw-r--r-- 932 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
#!/bin/sh
# autopkgtest check: build and run the tests that are provided by upstream.
# Run the tests that come with the upstream source.
# The whole folder test/ is copied into a temporary directory where the
# tests will be run, as some of them will write into the directory.
# (C) 2020 Pierre Gruet.
# Author: Pierre Gruet <pgt@debian.org>

set -e

SOURCEDIR=$(pwd)
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cp -r test/ $WORKDIR
cd $WORKDIR

# The classpath is made of the test sources, the build jar and the jars of
# testng and jcommander.
export CLASSPATH=$WORKDIR/test:/usr/share/java/intervalstorej.jar:/usr/share/java/testng.jar:/usr/share/java/jcommander.jar
find test -name "*.java" | xargs javac -source 1.8 -target 1.8
# Unzipping the data files used by some tests.
for F in $(find test -name "*.zip"); do
        unzip $F -d ${F%/*};
done
java org.testng.TestNG $SOURCEDIR/debian/tests.xml