Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests when elements are intentionally not built #1134

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 71 additions & 52 deletions buildsys/bamboo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,9 @@ setConvenienceVars() {
echo " junobaseoptions = $junobaseoptions"
}

# Singleton used for setting config line of a codebase when it should not be built.
NOBUILD="NOBUILD"

#-------------------------------------------------------------------------
# Function: getconfig
# Description:
Expand Down Expand Up @@ -421,7 +424,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv"
elementsConfigStr="$elementsbaseoptions --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -437,10 +440,10 @@ getconfig() {
depsStr="-r none" # Dependencies only needed for elements
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv"
elementsConfigStr="NOBUILD"
macroConfigStr="NOBUILD"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;
sstmainline_config_linux_with_cuda)
#-----------------------------------------------------------------
Expand All @@ -456,7 +459,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv --disable-mem-pools"
elementsConfigStr="$elementsbaseoptions --with-cuda=$CUDA_ROOT --with-gpgpusim=$SST_DEPS_INSTALL_GPGPUSIM --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
# Must Setup the GPGPUSIM Environment
Expand Down Expand Up @@ -485,9 +488,9 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv --disable-mem-pools --disable-mpi"
elementsConfigStr="$elementsbaseoptions --with-cuda=$CUDA_ROOT --with-gpgpusim=$SST_DEPS_INSTALL_GPGPUSIM --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
# Must Setup the GPGPUSIM Environment
echo "SETUP THE GPGPUSIM ENVIRONMENT"
echo "==== ENV BEFORE GPGPUSIM ENV SETUP ==="
Expand All @@ -514,7 +517,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv --disable-mpi"
elementsConfigStr="$elementsbaseoptions --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM --with-pin=$SST_DEPS_INSTALL_INTEL_PIN $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -528,7 +531,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="$elementsbaseoptions"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -544,7 +547,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions $coreMiscEnv"
elementsConfigStr="$elementsbaseoptions --with-hbmdramsim=$SST_DEPS_INSTALL_HBM_DRAMSIM2 --with-ramulator=$SST_DEPS_INSTALL_RAMULATOR --with-goblin-hmcsim=$SST_DEPS_INSTALL_GOBLIN_HMCSIM --with-dramsim3=$SST_DEPS_INSTALL_DRAMSIM3 --with-dramsim=$SST_DEPS_INSTALL_DRAMSIM --with-nvdimmsim=$SST_DEPS_INSTALL_NVDIMMSIM --with-hybridsim=$SST_DEPS_INSTALL_HYBRIDSIM $elementsMiscEnv"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -560,10 +563,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which clang` CXX=`which clang++` --with-pth=$PTH_HOME --disable-regex --with-sst-core=$SST_CORE_INSTALL"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst-macro_nosstcore_mac)
Expand All @@ -576,11 +579,11 @@ getconfig() {
miscEnv="${cc_environment} ${mpi_environment}"
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="NOBUILD"
elementsConfigStr="NOBUILD"
coreConfigStr="${NOBUILD}"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which clang` CXX=`which clang++` --with-pth=$PTH_HOME --disable-regex"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst-macro_withsstcore_linux)
Expand All @@ -594,10 +597,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which gcc` CXX=`which g++` --disable-regex --disable-unordered-containers --with-sst-core=$SST_CORE_INSTALL"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst-macro_nosstcore_linux)
Expand All @@ -610,11 +613,11 @@ getconfig() {
miscEnv="${cc_environment} ${mpi_environment}"
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="NOBUILD"
elementsConfigStr="NOBUILD"
coreConfigStr="${NOBUILD}"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which gcc` CXX=`which g++` --disable-regex --disable-unordered-containers"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sst_Macro_make_dist)
Expand All @@ -629,10 +632,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="--prefix=$SST_MACRO_INSTALL CC=`which gcc` CXX=`which g++` --disable-regex --disable-unordered-containers --with-sst-core=$SST_CORE_INSTALL"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

sstmainline_config_make_dist_test)
Expand All @@ -648,7 +651,7 @@ getconfig() {
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="$elementsbaseoptions"
macroConfigStr="NOBUILD"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="$externalelementbaseoptions"
junoConfigStr="$junobaseoptions"
;;
Expand All @@ -665,10 +668,10 @@ getconfig() {
depsStr="-r none"
setConvenienceVars "$depsStr"
coreConfigStr="$corebaseoptions"
elementsConfigStr="NOBUILD"
macroConfigStr="NOBUILD"
externalelementConfigStr="NOBUILD"
junoConfigStr="NOBUILD"
elementsConfigStr="${NOBUILD}"
macroConfigStr="${NOBUILD}"
externalelementConfigStr="${NOBUILD}"
junoConfigStr="${NOBUILD}"
;;

*)
Expand Down Expand Up @@ -1123,7 +1126,7 @@ config_and_build() {
local source_dir="$4"
local conf_script_name="$5"

if [[ "${selected_config}" == "NOBUILD" ]]
if [[ "${selected_config}" == "${NOBUILD}" ]]
then
echo "============== ${repo_name} - NO BUILD REQUIRED ==============="
else
Expand Down Expand Up @@ -1355,7 +1358,7 @@ config_and_build_simple() {
local repo_name="$1"
local selected_config="$2"

if [[ "${selected_config}" == "NOBUILD" ]]
if [[ "${selected_config}" == "${NOBUILD}" ]]
then
echo "============== ${repo_name} - NO BUILD REQUIRED ==============="
else
Expand Down Expand Up @@ -2126,34 +2129,50 @@ then
echo "BAMBOO: SST original dotests retval = $retval"

# NOW RUN THE FRAMEWORKS ELEMENTS TESTS
if [[ ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS:+isSet} == isSet ]] ; then
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS ELEMENTS - SUBSET OF TESTS : ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS}"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS SUBSET OF TESTS (Set by wildcard) AFTER DOTESTS() HAVE RUN
cd $SST_ROOT
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT -w $SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS
frameworks_retval=$?
echo "BAMBOO: SST Frameworks Elements Test retval = $frameworks_retval"
else
if [[ ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS:+isSet} != isSet ]] ; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why core tests aren't run when a wildcard is specified, since you could theoretically only want a subset of core tests, not just elements, but this preserves the current logic.

echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS CORE AND ELEMENTS - FULL SET OF TESTS"
echo "*** RUNNING NEW TEST FRAMEWORKS CORE - FULL SET OF TESTS"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS FULL SET OF TESTS AFTER DOTESTS() HAVE RUN
cd $SST_ROOT

$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_CORE_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT
core_frameworks_retval=$?
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -k -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT
elements_frameworks_retval=$?
echo "BAMBOO: SST Frameworks Core Test retval = $core_frameworks_retval"
echo "BAMBOO: SST Frameworks Elements Test retval = $elements_frameworks_retval"
fi

cd $SST_ROOT
elements_frameworks_retval=0
if [[ "${SST_SELECTED_ELEMENTS_CONFIG}" != "${NOBUILD}" ]]; then
if [[ ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS:+isSet} == isSet ]] ; then
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS ELEMENTS - SUBSET OF TESTS : ${SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS}"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS SUBSET OF TESTS (Set by wildcard) AFTER DOTESTS() HAVE RUN
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT -w $SST_TEST_FRAMEWORKS_ELEMENTS_WILDCARD_TESTS
else
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS ELEMENTS - FULL SET OF TESTS"
echo "*** "
echo "**************************************************************************"
# WE ARE RUNNING THE FRAMEWORKS ELEMENTS FULL SET OF TESTS AFTER DOTESTS() HAVE RUN
$SST_PYTHON_APP_EXE $SST_TEST_FRAMEWORKS_ELEMENTS_APP_EXE $SST_TEST_FRAMEWORKS_PARAMS -k -z -r $SST_MULTI_RANK_COUNT -t $SST_MULTI_THREAD_COUNT
fi
elements_frameworks_retval=$?
else
echo "**************************************************************************"
echo "*** "
echo "*** RUNNING NEW TEST FRAMEWORKS - SKIPPING ELEMENTS, NOT BUILT"
echo "*** "
echo "**************************************************************************"
fi
echo "BAMBOO: SST Frameworks Elements Test retval = $elements_frameworks_retval"

# Check the retval result from the bamboo dotests then check the frameworks_retval results with the frameworks run
if [ $retval -eq 0 ]; then
# Did the dotests pass, if so, then return the results
Expand Down
Loading