Skip to content

Commit

Permalink
Fix test-script assumption of fglt binary location
Browse files Browse the repository at this point in the history
I.e.: ensure that the test scripts can be run regardless of where they
are called from (particularly useful if one does not build/install FGlT
in a 1-deep subdirectory of the source tree).
  • Loading branch information
ailiop authored and fcdimitr committed Jun 20, 2022
1 parent 50c3be9 commit 9fd61c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions testdata/test_s12.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

DIR_TESTDATA=$(cd "$(dirname "$0")" && pwd)

FGLT=${1:-./fglt}

${FGLT} ../testdata/s12.mtx
diff freq_net.csv ../testdata/s12_freq_net_gold.csv
${FGLT} "${DIR_TESTDATA}"/s12.mtx
diff freq_net.csv "${DIR_TESTDATA}"/s12_freq_net_gold.csv
6 changes: 4 additions & 2 deletions testdata/test_s6.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

DIR_TESTDATA=$(cd "$(dirname "$0")" && pwd)

FGLT=${1:-./fglt}

${FGLT} ../testdata/s6.mtx
diff freq_net.csv ../testdata/s6_freq_net_gold.csv
${FGLT} "${DIR_TESTDATA}"/s6.mtx
diff freq_net.csv "${DIR_TESTDATA}"/s6_freq_net_gold.csv

0 comments on commit 9fd61c2

Please sign in to comment.