Skip to content

Commit

Permalink
checkLibs : extract foldername from repo uri
Browse files Browse the repository at this point in the history
  • Loading branch information
Alidra committed May 2, 2024
1 parent 0d2fba1 commit 5abc457
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ bnf:

.PHONY: test_libs
test_libs: lambdapi
@dune exec --only-packages lambdapi -- tests/test_libs.sh https://github.com/Deducteam/lambdapi-logics.git lambdapi-logics
@dune exec --only-packages lambdapi -- tests/test_libs.sh https://github.com/Deducteam/lambdapi-stdlib.git lambdapi-stdlib
@dune exec --only-packages lambdapi -- tests/test_libs.sh https://github.com/Deducteam/lambdapi-logics.git
@dune exec --only-packages lambdapi -- tests/test_libs.sh https://github.com/Deducteam/lambdapi-stdlib.git

#### Unit tests and sanity check #############################################

Expand Down
10 changes: 7 additions & 3 deletions tests/test_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ TIMEFORMAT="%Es"
out=/tmp/lambdapi.output

checkout_lib() {
git clone $1 $2
IFS='/' read -ra ADDR <<< "$1"
repo_name="${ADDR[-1]}"
IFS='.' read -ra ADDR <<< "$repo_name"
repo_name="${ADDR[0]}"
git clone $1 $repo_name
}

test_Lib() {
Expand All @@ -19,6 +23,6 @@ test_Lib() {
done
}

checkout_lib $1 $2
checkout_lib $1
options='-w'
time test_Lib $2
time test_Lib $repo_name

0 comments on commit 5abc457

Please sign in to comment.