Add Makefile, fix multiple things
Makefile: useful to run in parallel at no cost
This commit is contained in:
parent
d45b1ffc36
commit
461f3d3ef0
5 changed files with 20 additions and 7 deletions
7
Makefile
Normal file
7
Makefile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
TESTS := $(shell find "glibc/build/" -executable -name 'test-*' -or -executable -name 'tst-*')
|
||||||
|
TESTS_SUFFIX := $(TESTS:=.test)
|
||||||
|
|
||||||
|
all: $(TESTS_SUFFIX)
|
||||||
|
|
||||||
|
%.test: %
|
||||||
|
./run_single_test.sh $<
|
2
env
2
env
|
@ -26,4 +26,4 @@ export PYTHONPATH="$PYTHONPATH:$python_base"
|
||||||
|
|
||||||
export PS1="(efc_env) $PS1"
|
export PS1="(efc_env) $PS1"
|
||||||
|
|
||||||
unset base_dir glibc_base python_version python_base
|
unset glibc_base python_version python_base
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
intervaltree==2.1.0
|
intervaltree==2.1.0
|
||||||
pyelftools==0.24
|
git+https://github.com/eliben/pyelftools.git
|
||||||
sortedcontainers==1.5.9
|
sortedcontainers==1.5.9
|
||||||
|
|
|
@ -5,12 +5,12 @@ cd "$base_dir"
|
||||||
|
|
||||||
source ./env
|
source ./env
|
||||||
|
|
||||||
if [ "$#" -le 1 ] ; then
|
if [ "$#" -lt 1 ] ; then
|
||||||
>&2 echo -e "Missing argument: test name. Usage example:\n" \
|
>&2 echo -e "Missing argument: test name. Usage example:\n" \
|
||||||
"$0 math/test-matherr"
|
"$0 math/test-matherr"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
test_file="$1"
|
test_file="$(echo "$1" | sed 's|glibc/build/||')"
|
||||||
|
|
||||||
glibc_base="$base_dir/glibc/build"
|
glibc_base="$base_dir/glibc/build"
|
||||||
test_path="$glibc_base/$test_file"
|
test_path="$glibc_base/$test_file"
|
||||||
|
|
12
setup_env.sh
12
setup_env.sh
|
@ -22,6 +22,10 @@ function gitclone {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function do_make {
|
||||||
|
make $(MAKE_FLAGS) $1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
base_dir="$(dirname "$(readlink -f "$0")")"
|
base_dir="$(dirname "$(readlink -f "$0")")"
|
||||||
cd "$base_dir"
|
cd "$base_dir"
|
||||||
|
@ -42,12 +46,14 @@ source venv/bin/activate
|
||||||
pip install -r requirements.txt || fail
|
pip install -r requirements.txt || fail
|
||||||
|
|
||||||
# Compiling glibc
|
# Compiling glibc
|
||||||
|
install_dir="$base_dir/glibc/build/install"
|
||||||
status_update "Compiling base glibc"
|
status_update "Compiling base glibc"
|
||||||
(
|
(
|
||||||
mkdir -p glibc/build/install
|
mkdir -p glibc/build/install
|
||||||
cd glibc/build
|
cd glibc/build
|
||||||
../configure --prefix="$base_dir/glibc/build/install" || exit 1
|
../configure --prefix="$install_dir" || exit 1
|
||||||
make || exit 1
|
do_make || exit 1
|
||||||
|
do_make install || exit 1
|
||||||
) || fail
|
) || fail
|
||||||
|
|
||||||
# Compiling testsuite
|
# Compiling testsuite
|
||||||
|
@ -55,7 +61,7 @@ status_update "Compiling glibc testsuite"
|
||||||
status_update "Feel free to go and drink some coffee now. This will take some time."
|
status_update "Feel free to go and drink some coffee now. This will take some time."
|
||||||
(
|
(
|
||||||
cd glibc/build
|
cd glibc/build
|
||||||
make check || exit 1
|
CPATH="$install_dir/include:$CPATH" do_make check || exit 1
|
||||||
) || fail
|
) || fail
|
||||||
|
|
||||||
# Done!
|
# Done!
|
||||||
|
|
Loading…
Add table
Reference in a new issue