Skip to content

Commit

Permalink
Updated tests (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
ulises-jeremias authored Dec 9, 2022
1 parent 183269f commit 9887d27
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ jobs:
- name: Verify Fmt
run: v fmt -verify ~/.vmodules/vsl

run-tests:
run-tests-on-linux:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-20.04
- ubuntu-18.04
flags:
Expand Down
30 changes: 18 additions & 12 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## --use-cblas Execute tests using cblas
## --use-autofree Execute tests using atofree
## --use-gc=STRATEGY Execute tests using garbage collector
## --skip-examples Skip examples compilation
##

ROOT=$(dirname "$0")
Expand Down Expand Up @@ -55,15 +56,20 @@ v ${flags} test "${vsl_dir_path}"

find "${vsl_dir_path}" -name '*_test' -exec rm -f {} +

echo "Compiling Examples with flags ${flags}"
for file in $(find "${vsl_dir_path}" -wholename '*/examples/*.v'); do
if [[ "${file}" == *"not_ci"* ]]; then
echo "Skipping ${file}"
continue
fi
echo "Compiling ${file}"
v ${flags} -o "${file}.o" "${file}"
echo "${file}.o created"
echo "Removing ${file}.o"
rm -f "${file}.o"
done
if [[ -z "${skip_examples}" ]]; then
echo "Compiling examples"
echo "Compiling Examples with flags ${flags}"
for file in $(find "${vsl_dir_path}" -wholename '*/examples/*.v'); do
if [[ "${file}" == *"not_ci"* ]]; then
echo "Skipping ${file}"
continue
fi
echo "Compiling ${file}"
v ${flags} -o "${file}.o" "${file}"
echo "${file}.o created"
echo "Removing ${file}.o"
rm -f "${file}.o"
done
else
echo "Skipping examples compilation"
fi

0 comments on commit 9887d27

Please sign in to comment.