eh_frame_check_setup/run_single_test.sh
Théophile Bastian 461f3d3ef0 Add Makefile, fix multiple things
Makefile: useful to run in parallel at no cost
2018-03-26 17:20:29 +02:00

28 lines
658 B
Bash
Executable file

#!/bin/bash
base_dir="$(dirname "$(readlink -f "$0")")"
cd "$base_dir"
source ./env
if [ "$#" -lt 1 ] ; then
>&2 echo -e "Missing argument: test name. Usage example:\n" \
"$0 math/test-matherr"
exit 1
fi
test_file="$(echo "$1" | sed 's|glibc/build/||')"
glibc_base="$base_dir/glibc/build"
test_path="$glibc_base/$test_file"
eh_frame_check="$base_dir/eh_frame_check/testing/eh_frame_check.py"
if [ ! -x "$test_path" ] ; then
>&2 echo "File $test_path does not exist or is not executable."
exit 1
fi
gdb -q -x "$eh_frame_check" \
-args $glibc_base/elf/ld-linux-x86-64.so.2 \
--library-path "$LIB_PATH" \
"$test_path"