run_rajaperf.sh - Add options for testing.
run_rajaperf.sh - builds the suite.
run_rajaperf.sh unit - runs raja unit tests.
run_rajaper.sh perf - runs performance tests.
@@ -56,15 +56,16 @@ else
return 1
fi
-# Apply patches
-patchrepo $AOMP_REPOS_TEST/RAJAPerf/tpl/RAJA
-patchrepo $AOMP_REPOS_TEST/RAJAPerf
+BUILD_SUFFIX=aomp_omptarget
+if [ "$#" == 0 ]; then
# Begin configuration
pushd $AOMP_REPOS_TEST/RAJAPerf
git reset --hard f446416
git submodule update
-BUILD_SUFFIX=aomp_omptarget
+ # Apply patches
+ patchrepo $AOMP_REPOS_TEST/RAJAPerf/tpl/RAJA
+ patchrepo $AOMP_REPOS_TEST/RAJAPerf
rm -rf build_${BUILD_SUFFIX} >/dev/null
mkdir build_${BUILD_SUFFIX}
pushd build_${BUILD_SUFFIX}
@@ -83,23 +84,34 @@ $AOMP_CMAKE \
..
make -j $AOMP_JOB_THREADS
+ # Cleanup patches
+ removepatch $AOMP_REPOS_TEST/RAJAPerf/tpl/RAJA
+ removepatch $AOMP_REPOS_TEST/RAJAPerf
# Do not continue if build fails
if [ $? != 0 ]; then
echo "ERROR: Make returned non-zero, exiting..."
- removepatch $AOMP_REPOS_TEST/RAJAPerf/tpl/RAJA
- removepatch $AOMP_REPOS_TEST/RAJAPerf
exit 1
fi
-
popd
popd
+ exit
+fi
+# Run performance tests or unit tests
pushd $AOMP_REPOS_TEST/RAJAPerf
-#build_aomp_omptarget/bin/raja-perf-omptarget.exe --show-progress --refvar Base_OMPTarget
+if [ "$1" == "perf" ]; then
+ build_aomp_omptarget/bin/raja-perf-omptarget.exe --show-progress --refvar Base_OMPTarget
+elif [ "$1" == "unit" ]; then
+ if [ -d build_${BUILD_SUFFIX} ]; then
+ cd build_${BUILD_SUFFIX}
+ make test
+ else
+ echo Error: No build directory found!
+ exit 1
+ fi
+else
+ echo Error: $@ not a recognized option.
+ exit 1
+fi
popd
-
-# Remove patches
-removepatch $AOMP_REPOS_TEST/RAJAPerf/tpl/RAJA
-removepatch $AOMP_REPOS_TEST/RAJAPerf
-
