summaryrefslogtreecommitdiff
path: root/tests/test_env.sh
diff options
context:
space:
mode:
authorAndrew Shadura <andrew.shadura@collabora.co.uk>2018-03-25 20:15:05 +0200
committerAndrew Shadura <andrew.shadura@collabora.co.uk>2018-03-25 20:15:05 +0200
commit3e04a02fd1d845d4c72f63783fa980591a22b076 (patch)
tree3a908bef1e16903611f19e2fdac2cebc7ad93420 /tests/test_env.sh
parent973720f3f0554f5f19d12d37dc85ab973c9933a8 (diff)
New upstream version 1.4.2
Diffstat (limited to 'tests/test_env.sh')
-rw-r--r--tests/test_env.sh49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/test_env.sh b/tests/test_env.sh
new file mode 100644
index 0000000..3d31c23
--- /dev/null
+++ b/tests/test_env.sh
@@ -0,0 +1,49 @@
+srcdir="$(atf_get_srcdir)"
+export PATH="$srcdir/..:${PATH}"
+
+#--- begin windows kludge ---
+# When building with Visual Studio, binaries are in a subdirectory named after the configration...
+# and the configuration is not known unless you're in the IDE, or something.
+# So just guess. This won't work well if you build more than one configuration.
+the_configuration=""
+for configuration in Debug Release RelWithDebInfo
+do
+ if test -d "$srcdir/../$configuration"
+ then
+ if test "$the_configuration" != ""
+ then
+ echo "test_env.sh: FAIL: more than one configuration found"
+ exit 1
+ fi
+ the_configuration=$configuration
+ export PATH="$srcdir/../${configuration}:${PATH}"
+ fi
+done
+#--- end kludge ---
+
+selfdir="/Users/kaniini/dev-src/pkgconf/tests"
+PATH_SEP=":"
+SYSROOT_DIR="${selfdir}/test"
+case "$(uname -s)" in
+Msys|CYGWIN*) PATH_SEP=";";;
+esac
+
+prefix="/usr/local"
+exec_prefix="${prefix}"
+datarootdir="${prefix}/share"
+pcpath="${exec_prefix}/lib/pkgconfig:${datarootdir}/pkgconfig"
+
+tests_init()
+{
+ TESTS="$@"
+ export TESTS
+ for t ; do
+ atf_test_case $t
+ done
+}
+
+atf_init_test_cases() {
+ for t in ${TESTS}; do
+ atf_add_test_case $t
+ done
+}