1#!/bin/bash -e 2# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 4# Either tests runner script or the tools/fedabipkgdiff has shebang 5# `/usr/bin/env python`, as a result, to run tests in Python 3, we have to 6# change PATH in order to make sure python can be found before the current 7# $PATH. 8 9PY3_TEMP=$(mktemp -d --tmpdir libabigail-py3-temp-XXXXXXXX) 10 11ln -s $(which @PYTHON3_INTERPRETER@) $PY3_TEMP/python 12 13export PATH=$PY3_TEMP:$PATH 14 15function clean_env 16{ 17 unlink $PY3_TEMP/python 18 rmdir $PY3_TEMP 19} 20 21trap "clean_env" EXIT 22 23@PYTHON3_INTERPRETER@ "@abs_top_builddir@/tests/runtestfedabipkgdiff.py" 24