Skip to content

Commit

Permalink
github/test: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jxy committed Jun 6, 2020
1 parent 7e5a031 commit b82a2f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 39 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: environment
run: echo "::set-env name=FUELCompat::${{ matrix.fuel-compat }}"
run: |
echo "::set-env name=FUELCompat::${{ matrix.fuel-compat }}"
sudo sh -c 'echo %e.core.%p.%t > /proc/sys/kernel/core_pattern'
- name: install packages
run: |
sudo apt-get install numdiff hwloc-nox libhwloc-dev mpich libmpich-dev gdb
Expand All @@ -35,6 +37,7 @@ jobs:
hwloc-ls
gcc -v
mpicc -v
cat /proc/sys/kernel/core_pattern
- name: checkout Nim
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -77,17 +80,11 @@ jobs:
working-directory: qex
run: |
ulimit -c unlimited
cat /proc/sys/kernel/core_pattern
sudo sh -c 'echo %e.core.%p.%t > /proc/sys/kernel/core_pattern'
cat /proc/sys/kernel/core_pattern
CLEANUPJOBS=./finalizeTests ./testscript.sh
- name: runtests
working-directory: qex
run: |
ulimit -c unlimited
cat /proc/sys/kernel/core_pattern
sudo sh -c 'echo %e.core.%p.%t > /proc/sys/kernel/core_pattern'
cat /proc/sys/kernel/core_pattern
CLEANUPJOBS=./finalizeTests ./runtests.sh
- name: make bench
working-directory: qex
Expand Down
43 changes: 11 additions & 32 deletions finalizeTests
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
#!/usr/bin/env bash
set -eu
ulimit -c unlimited
sudo sh -c 'echo %e.core.%p.%t > /proc/sys/kernel/core_pattern'

declare -i k=0
declare -i f=0
while ! ls staghmc_sh.core.* &>/dev/null;do
if ! tests/extra/staghmc_sh/run bin/staghmc_sh;then
((++f))
fi
((++k))
echo ">>> FAILURE RATE: $f / $k <<<"
done
for core in staghmc_sh.core.*;do
for core in *.core.*;do
[[ -s $core ]] || continue
echo "==================="
echo "$core"
exe=${core%.core.*}
exes=($(find . -type f -name $exe))
for exe in "${exes[@]}";do
[[ -s $exe ]] || continue
echo "$exe"
echo "==================="
gdb --batch --quiet \
-ex "thread apply all bt full" \
"$exe" "$core"
done
echo "==================="
gdb --batch --quiet \
-ex "thread apply all bt full" \
-ex "info args" \
-ex "info locals" \
-ex "up" \
-ex "info args" \
-ex "info locals" \
-ex "up" \
-ex "info args" \
-ex "info locals" \
-ex "up" \
-ex "info args" \
-ex "info locals" \
-ex "up" \
-ex "info args" \
-ex "info locals" \
-ex "quit" \
./bin/staghmc_sh "$core"
echo .
done

0 comments on commit b82a2f9

Please sign in to comment.