File: run-pkg-config-validation.sh

package info (click to toggle)
tango 10.0.2%2Bdfsg1-2%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 89,936 kB
  • sloc: cpp: 201,786; sh: 1,645; python: 953; java: 800; perl: 467; javascript: 447; xml: 325; makefile: 269; sql: 72; ruby: 24
file content (28 lines) | stat: -rwxr-xr-x 800 bytes parent folder | download | duplicates (4)
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
27
28
#! /usr/bin/env bash

set -e

# taken from https://stackoverflow.com/a/246128
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

source "${SCRIPT_DIR}"/vars.sh

mkdir -p ${BUILD_DIR}/tests/results

pkg-config --validate ${BUILD_DIR}/tango.pc 2>&1 | tee ${BUILD_DIR}/tests/results/pkgconfig-validation.log

if [[ -f "build/tests/results/pkgconfig-validation.log" ]]
then
	if [[ -s "build/tests/results/pkgconfig-validation.log" ]]
	then
		# The log file is not empty. Some errors got reported during pkg-config validation
		echo "ERROR: tango.pc file pkg-config validation NOT OK"
		exit 1
	else
		echo "SUCCESS: tango.pc file pkg-config validation OK"
		exit 0
	fi
else
	echo "ERROR: Could not create ${BUILD_DIR}/tests/results/pkgconfig-validation.log file"
	exit 2
fi