Skip to content

Commit 8ac85ff

Browse files
committed
Restrict triangle_count test to reference+omp & hyperdags backends
1 parent 9f587bf commit 8ac85ff

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

tests/smoke/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ add_grb_executables( kcore_decomposition kcore_decomposition.cpp
182182

183183
add_grb_executables( triangle_count triangle_count.cpp
184184
ADDITIONAL_LINK_LIBRARIES test_utils_headers
185-
BACKENDS reference reference_omp
185+
BACKENDS reference reference_omp hyperdags
186186
)
187187

188188
# targets to list and build the test for this category

tests/smoke/smoketests.sh

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -366,39 +366,41 @@ for BACKEND in ${BACKENDS[@]}; do
366366
fi
367367
echo " "
368368

369-
echo ">>> [x] [ ] Testing the Triangle couting algorithm on the dwt_59.mtx"
370-
if [ -f ${INPUT_DIR}/dwt_59.mtx ]; then
371-
$runner ${TEST_BIN_DIR}/triangle_count_${BACKEND} ${INPUT_DIR}/dwt_59.mtx direct 30 1 1 &> ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log
372-
head -1 ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log
373-
if ! grep -q 'Test OK' ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log; then
374-
echo "Test FAILED"
375-
elif ! grep -q '11 iterations to converge' ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log; then
376-
echo "Verification FAILED"
377-
echo "Test FAILED"
369+
if [ "$BACKEND" = "reference" ] || [ "$BACKEND" = "reference_omp" ] || [ "$BACKEND" = "hyperdags" ]; then
370+
echo ">>> [x] [ ] Testing the Triangle couting algorithm on the dwt_59.mtx"
371+
if [ -f ${INPUT_DIR}/dwt_59.mtx ]; then
372+
$runner ${TEST_BIN_DIR}/triangle_count_${BACKEND} ${INPUT_DIR}/dwt_59.mtx direct 30 1 1 &> ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log
373+
head -1 ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log
374+
if ! grep -q 'Test OK' ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log; then
375+
echo "Test FAILED"
376+
elif ! grep -q '11 iterations to converge' ${TEST_OUT_DIR}/triangle_count_dwt_59_${BACKEND}_${P}_${T}.log; then
377+
echo "Verification FAILED"
378+
echo "Test FAILED"
379+
else
380+
echo "Test OK"
381+
fi
378382
else
379-
echo "Test OK"
383+
echo "Test DISABLED: dwt_59.mtx was not found. To enable, please provide ${INPUT_DIR}/dwt_59.mtx"
380384
fi
381-
else
382-
echo "Test DISABLED: dwt_59.mtx was not found. To enable, please provide ${INPUT_DIR}/dwt_59.mtx"
383-
fi
384-
echo " "
385+
echo " "
385386

386-
echo ">>> [x] [ ] Testing the Triangle couting algorithm on the gyro_m.mtx"
387-
if [ -f ${INPUT_DIR}/gyro_m.mtx ]; then
388-
$runner ${TEST_BIN_DIR}/triangle_count_${BACKEND} ${INPUT_DIR}/gyro_m.mtx direct 598470 1 1 &> ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log
389-
head -1 ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log
390-
if ! grep -q 'Test OK' ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log; then
391-
echo "Test FAILED"
392-
elif ! grep -q '11 iterations to converge' ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log; then
393-
echo "Verification FAILED"
394-
echo "Test FAILED"
387+
echo ">>> [x] [ ] Testing the Triangle couting algorithm on the gyro_m.mtx"
388+
if [ -f ${INPUT_DIR}/gyro_m.mtx ]; then
389+
$runner ${TEST_BIN_DIR}/triangle_count_${BACKEND} ${INPUT_DIR}/gyro_m.mtx direct 598470 1 1 &> ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log
390+
head -1 ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log
391+
if ! grep -q 'Test OK' ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log; then
392+
echo "Test FAILED"
393+
elif ! grep -q '11 iterations to converge' ${TEST_OUT_DIR}/triangle_count_gyro_m_${BACKEND}_${P}_${T}.log; then
394+
echo "Verification FAILED"
395+
echo "Test FAILED"
396+
else
397+
echo "Test OK"
398+
fi
395399
else
396-
echo "Test OK"
400+
echo "Test DISABLED: gyro_m.mtx was not found. To enable, please provide ${INPUT_DIR}/gyro_m.mtx"
397401
fi
398-
else
399-
echo "Test DISABLED: gyro_m.mtx was not found. To enable, please provide ${INPUT_DIR}/gyro_m.mtx"
402+
echo " "
400403
fi
401-
echo " "
402404

403405
if [ "$BACKEND" = "bsp1d" ] || [ "$BACKEND" = "hybrid" ]; then
404406
echo "Additional standardised smoke tests not yet supported for the ${BACKEND} backend"

0 commit comments

Comments
 (0)